Discovering the XOs local timezone in a bash script
C. Scott Ananian
cscott at cscott.net
Sun Mar 13 13:13:26 EDT 2011
On Sun, Mar 13, 2011 at 1:04 PM, Sascha Silbe <silbe at activitycentral.com> wrote:
> Excerpts from C. Scott Ananian's message of Sun Mar 13 16:41:36 +0100 2011:
>
>> I apologize; I think the code that sets timezone "correctly" might
>> have been code I wrote for litl, not OLPC.
>
> No problem. Do you remember how it worked at Litl? Did you manipulate
> /etc/timezone directly or using a distro specific tool?
We read the list of time zones from /usr/share/zoneinfo/zone.tab in
the GUI code, and set the time and time zone by calling /sbin/hwclock
and manipulating /etc/localtime and /etc/timezone directly in what I
believe was a dbus system service running as root. The dbus service
was about 70 lines of g-o-i javascript.
--scott
--
( http://cscott.net/ )
More information about the Devel
mailing list