Hey, Bart Smaalders wrote: > I've been mulling over a enhancement to timezones on Solaris; I've > mentioned this before but I was wondering what the desktop folks > think of this idea... > > Suppose we invent a new timezone type that represents an additional > level of indirection through a file. It might look something like this: > > $ export TZ="</home/barts/.tzfile>" > $ cat /home/barts/.tzfile > US/Pacific > $ > > The libc timezone code would be modified to stat the file and > reevaluate the timezone should it be updated. > > This would support changing the current desktop timezone w/o logging > out or restarting any processes. Applications that make heavy use > of localtime() or other functions that convert between GMT and localtime > might experience some performance issues, so this might not be > appropriate for applications that do a lot of logging such as > webservers. For laptops traveling between timezones, it seems a lot > nicer that just crowbaring the system's idea of time with a date(1) > command, esp. since system log files, etc, would still be in whatever > system timezone is used.
Sounds very useful to me. I've mostly been resorting to using the attached script which works out quite nice (requires TimeDate perl module). $ cat ~/.tzlist Pacific/Auckland "Auckland" Europe/Dublin "Dublin" Europe/Paris "Paris" Asia/Calcutta "Bangalore" Australia/Sydney "Sydney" Australia/Perth "Perth" America/Los_Angeles "Los Angeles" America/New_York "New York" America/Indiana/Indianapolis "Indiana" America/Chicago "Austin" America/Toronto "Toronto" Asia/Singapore "Singapore" $ slashtime.pl Los Angeles 05:45 Tue, 10 Jul 07 (PDT) -19 Austin 07:45 Tue, 10 Jul 07 (CDT) -17 Toronto 08:45 Tue, 10 Jul 07 (EDT) -16 Indiana 08:45 Tue, 10 Jul 07 (EDT) -16 New York 08:45 Tue, 10 Jul 07 (EDT) -16 Dublin 13:45 Tue, 10 Jul 07 (IST) -11 Paris 14:45 Tue, 10 Jul 07 (CEST) -10 Bangalore 18:15 Tue, 10 Jul 07 (IST) -6.5 Singapore 20:45 Tue, 10 Jul 07 (SGT) -4 Perth 20:45 Tue, 10 Jul 07 (WST) -4 Sydney 22:45 Tue, 10 Jul 07 (EST) -2 Local 00:45 Wed, 11 Jul 07 (NZST) +0 Auckland 00:45 Wed, 11 Jul 07 (NZST) +0 Glynn -------------- next part -------------- A non-text attachment was scrubbed... Name: slashtime.pl Type: application/x-perl Size: 5497 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/desktop-discuss/attachments/20070711/314e8f31/attachment.pl>
