Re: date(1) in stretch and buster
- Date: Tue, 9 Apr 2019 13:28:40 -0500
- From: David Wright <deblis@xxxxxxxxxxxxxxxxx>
- Subject: Re: date(1) in stretch and buster
On Tue 09 Apr 2019 at 15:38:43 (+0200), Vincent Lefevre wrote:
> On 2019-04-08 18:26:23 +0300, Reco wrote:
> > stretch$ TZ=UTC date
> > Mon Apr 8 15:22:02 UTC 2019
> > buster$ TZ=UTC date
> > Mon 08 Apr 2019 03:22:04 PM UTC
> This is unrelated to your issue, but note that the correct TZ string
> for UTC is "UTC0", not "UTC". See
I think it's unwise to write that here. AIUI GNU/linux date uses the
so-called 3rd format for timezones, which points into the time zone
database. There's an entry in that database for UTC, but not for UTC*.
And, of course, what would the civil name be for date to label that
timezone with? You can't use just "UTC".
BTW it prints the right answer because it only looks at the 0; the
UTC is ignored. (See BTS #646174.)
The database, of course, contains a lot more information than the
standard you have quoted (for the 1st and 2nd formats) which only
tells you what time zone you're in now, and when that zone last
switched and will switch to/from DST. For example, it should know that
at the time of the Unix Epoch, Britain was "enjoying" summer time,
which we called "British Standard Time" at the time, and it does.
So we celebrated the New Year at the "wrong time" on three occasions
in that period, 1969, 1970 & 1971.
$ TZ=Europe/London date -d '1970-01-01 00:00:00 +0000'
Thu Jan 1 01:00:00 BST 1970
$ TZ=Europe/London date -d '1972-01-01 00:00:00 +0000'
Sat Jan 1 00:00:00 GMT 1972
My question about the OP's issue is whether I'm going to have to
change something to keep what I get in jessie and stretch, or is
this just a temporary bug in buster. Or has the US format been
wrong all along? (As an expat, I'm unfit to say.)
$ TZ=UTC date
Tue Apr 9 16:53:28 UTC 2019
ie a 24-hour clock, and not a 12-hour clock trying to look like a