On Monday, September 6, 2004, at 11:00 PM, Joey Hess wrote:
Rick Thomas wrote:Apparently, it looks at the "LANG" environment variable...
LANG=C /sbin/hwclock --show --localtime gives Tue Sep 7 02:22:16 2004 -0.463550 seconds but LANG=en_US /sbin/hwclock --show --localtime gives Tue 07 Sep 2004 02:23:24 AM EDT -0.950496 seconds
Ok, I see: I have LC_TIME=C while LANG=en_US.
Suggested fix: Use a "LANG=C" prefix.
That really doesn't work, the time display needs to be localised along with everything else.
Unfortunatly I can't think of a good way to remove the time zone from the display that'll work for all LC_TIME settings.
-- see shy jo
OK: How about this
/sbin/hwclock --show --localtime --debug | sed -n 's/Time read from Hardware Clock: //p'
which prints this
2004/09/07 05:03:27
Which is pretty much language/locale independent.
Rick
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]