[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

date -u does not use utc to set the date

From: Chuck Berg
Subject: date -u does not use utc to set the date
Date: Thu, 8 Mar 2001 22:09:43 -0500

date -u does not work as documented. The info file claims:
     Print or set the time and date in Universal Coordinated Time
     instead of in local (wall clock) time.

But instead, -u only applies when printing the time, and is ignored
when setting.

This is most easily demonstrated by this, which should set my time to
the same time it's currently set to, but instead sets it off by my
current offset from UTC:

dev2:/# date ; date -u `date -u +"%m%d%H%M%Y.%S"` ; date
Thu Mar  8 22:02:06 EST 2001
Fri Mar  9 08:02:06 UTC 2001
Fri Mar  9 03:02:06 EST 2001

reply via email to

[Prev in Thread] Current Thread [Next in Thread]