Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #207197

Re: date(1) in stretch and buster

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: date(1) in stretch and buster
Date 2019-04-09 20:30 +0200
Message-ID <xL3Fn-7wc-9@gated-at.bofh.it> (permalink)
References <xKEnD-8qa-1@gated-at.bofh.it> <xKZip-4Hx-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
> 
>   http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html

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
24-hour one.

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

date(1) in stretch and buster Reco <recoverym4n@enotuniq.net> - 2019-04-08 17:30 +0200
  Re: date(1) in stretch and buster Étienne Mollier <etienne.mollier@mailoo.org> - 2019-04-08 19:20 +0200
    Re: date(1) in stretch and buster Cindy Sue Causey <butterflybytes@gmail.com> - 2019-04-08 19:30 +0200
      Re: date(1) in stretch and buster "Thomas Schmitt" <scdbackup@gmx.net> - 2019-04-08 19:50 +0200
      Re: date(1) in stretch and buster Étienne Mollier <etienne.mollier@mailoo.org> - 2019-04-08 20:20 +0200
        Re: date(1) in stretch and buster Greg Wooledge <wooledg@eeg.ccf.org> - 2019-04-08 21:30 +0200
    Re: date(1) in stretch and buster Reco <recoverym4n@enotuniq.net> - 2019-04-08 20:10 +0200
  Re: date(1) in stretch and buster Vincent Lefevre <vincent@vinc17.net> - 2019-04-09 15:50 +0200
    Re: date(1) in stretch and buster Gene Heskett <gheskett@shentel.net> - 2019-04-09 20:10 +0200
      Re: date(1) in stretch and buster Greg Wooledge <wooledg@eeg.ccf.org> - 2019-04-09 20:10 +0200
      Re: date(1) in stretch and buster Michael Stone <mstone@debian.org> - 2019-04-09 20:30 +0200
        Re: date(1) in stretch and buster Michael Stone <mstone@debian.org> - 2019-04-09 21:20 +0200
        Re: date(1) in stretch and buster Gene Heskett <gheskett@shentel.net> - 2019-04-09 21:20 +0200
      Re: date(1) in stretch and buster Étienne Mollier <etienne.mollier@mailoo.org> - 2019-04-09 20:40 +0200
        Re: date(1) in stretch and buster Curt <curty@free.fr> - 2019-04-09 22:10 +0200
          Re: date(1) in stretch and buster David Wright <deblis@lionunicorn.co.uk> - 2019-04-09 23:00 +0200
      Re: date(1) in stretch and buster David Wright <deblis@lionunicorn.co.uk> - 2019-04-09 20:40 +0200
        Re: date(1) in stretch and buster Étienne Mollier <etienne.mollier@mailoo.org> - 2019-04-09 20:50 +0200
          Re: date(1) in stretch and buster David Wright <deblis@lionunicorn.co.uk> - 2019-04-09 21:50 +0200
        Re: date(1) in stretch and buster Gene Heskett <gheskett@shentel.net> - 2019-04-09 21:40 +0200
    Re: date(1) in stretch and buster David Wright <deblis@lionunicorn.co.uk> - 2019-04-09 20:30 +0200
      Re: date(1) in stretch and buster Greg Wooledge <wooledg@eeg.ccf.org> - 2019-04-09 21:00 +0200
        Re: date(1) in stretch and buster David Wright <deblis@lionunicorn.co.uk> - 2019-04-09 22:00 +0200
      Re: date(1) in stretch and buster Vincent Lefevre <vincent@vinc17.net> - 2019-04-10 13:40 +0200
        Re: date(1) in stretch and buster David Wright <deblis@lionunicorn.co.uk> - 2019-04-10 18:00 +0200

csiph-web