On 16 April 2013 at 13:09, Laurence Maddox wrote: | Package: date | Severity: important | Tags: l10n | | I need to view on the CLI the time in various timezones. | | | | I have correctly configured the time and timezone to the best of my knowledge. | I use this command: | dpkg-reconfigure tzdata && ntpdate pool.ntp.org && hwclock --systohc --utc |
Here is a simple counter-example: edd@max:~$ date # my local time Tue Apr 16 15:49:02 CDT 2013 edd@max:~$ TZ="America/Los_Angeles" date # arbitrary other TZ Tue Apr 16 13:49:15 PDT 2013 which works just fine. edd@max:~$ which date /bin/date edd@max:~$ date --version date (GNU coreutils) 8.13 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David MacKenzie. edd@max:~$ Dirk | | | I get this output: | Current default time zone: 'America/Chicago' | Local time is now: Tue Apr 16 14:45:29 CDT 2013. | Universal Time is now: Tue Apr 16 19:45:29 UTC 2013. | | 16 Apr 19:45:38 ntpdate[12036]: adjust time server 199.102.46.73 offset | -0.036668 sec | | | | | I have searched for the "right" way to complete my task, and found a link here: | http://www.linuxquestions.org/questions/programming-9/ | display-different-timezones-in-command-line-927660/ | | That link recommends that I complete my task using a command like this one: | TZ=UTC date && TZ=CDT date && TZ=IST date | | | | However, I get this output, which is obviously not what it should be: | Tue Apr 16 19:45:39 UTC 2013 | Tue Apr 16 19:45:39 CDT 2013 | Tue Apr 16 19:45:39 IST 2013 | | | -- System Information: | Debian Release: 6.0.6 | APT prefers stable-updates | APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, | 'testing'), (500, 'stable') | Architecture: amd64 (x86_64) | | Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores) | Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) | Shell: /bin/sh linked to /bin/dash -- Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

