1 -- $Id: 300_set_timezone.lua,v 1.3 2005/02/24 23:08:03 cpressey Exp $
5 local set_timezone = function()
6 local cmds, files, dir, filename, full_filename, found_file
9 id = "internal_clock_type",
10 name = _("Local or UTC (Greenwich Mean Time) clock"),
12 "Is this machine's internal clock set to local time " ..
13 "or UTC (Universal Coordinated Time, roughly the same " ..
14 "as Greenwich Mean Time)?\n\n" ..
15 "If you don't know, assume local time for now."
21 name = _("Local Time")
28 }).action_id == "utc" then
32 cmdline = "${root}${TOUCH} ${root}${base}etc/wall_cmos_clock",
34 base = App.state.target:get_base()
43 dir = App.expand("${root}${base}usr/share/zoneinfo",
45 base = App.state.target:get_base()
50 while not found_file do
51 filename = App.ui:select_file{
52 title = _("Select Time Zone"),
53 short_desc = _("Select a Time Zone appropriate to your physical location."),
54 cancel_desc = _("Return to Utilities Menu"),
57 if filename == "cancel" then
60 full_filename = dir .. "/" .. filename
61 if FileSystem.is_dir(full_filename) then
64 filename = full_filename
71 cmdline = "${root}${CP} ${filename} ${root}${base}etc/localtime",
74 base = App.state.target:get_base()
77 if cmds:execute() then
79 "The Time Zone has been successfully set to %s.",
86 name = _("Set Timezone"),