Re: setting the timezone with TZ env var
"John E. Davis" <[email protected]>
| Newsgroups | gmane.network.slrn.user |
|---|---|
| Message-ID | <[email protected]> |
Sven Guckes <[email protected]> wrote: > i understand that *not* using a filename which specifies a timezone will do. > so - as my timezone is "CEST" the following *should* work, right? > > $ TZ=CEST slrn It should: #v+ [3:43pm] strace slsh -e 'loop(5)()=strftime ("%X %x", localtime (_time()))' |& grep localtime open("/etc/localtime", O_RDONLY) = 3 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 [3:43pm] /home/john>setenv TZ "CEST" [lapdog] [7:44pm] /home/john>strace slsh -e 'loop(5)()=strftime ("%X %x", localtime (_time()))' |& grep localtime [7:44pm] /home/john>unsetenv TZ [3:44pm] /home/john> #v- Note that I use tcsh and have the time displayed in my tcsh prompt. --John ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/