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


Groups > linux.debian.user > #207139 > unrolled thread

date(1) in stretch and buster

Started byReco <recoverym4n@enotuniq.net>
First post2019-04-08 17:30 +0200
Last post2019-04-10 18:00 +0200
Articles 5 on this page of 25 — 10 participants

Back to article view | Back to linux.debian.user


Contents

  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

Page 2 of 2 — ← Prev page 1 [2]


#207197

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2019-04-09 20:30 +0200
Message-ID<xL3Fn-7wc-9@gated-at.bofh.it>
In reply to#207177
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.

[toc] | [prev] | [next] | [standalone]


#207204

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2019-04-09 21:00 +0200
Message-ID<xL48p-7GS-7@gated-at.bofh.it>
In reply to#207197
On Tue, Apr 09, 2019 at 01:28:40PM -0500, David Wright wrote:
> 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.)

Looks to be intentional and permanent.

https://sourceware.org/bugzilla/show_bug.cgi?id=24046

So, you can live with it, or you can override LC_TIME, or you can create
your own customized variant of en_US as I described earlier.  Other
solutions are welcome, but that's all I can think of.

[toc] | [prev] | [next] | [standalone]


#207211

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2019-04-09 22:00 +0200
Message-ID<xL54t-8hf-3@gated-at.bofh.it>
In reply to#207204
On Tue 09 Apr 2019 at 14:55:37 (-0400), Greg Wooledge wrote:
> On Tue, Apr 09, 2019 at 01:28:40PM -0500, David Wright wrote:
> > 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.)
> 
> Looks to be intentional and permanent.
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=24046
> 
> So, you can live with it, or you can override LC_TIME, or you can create
> your own customized variant of en_US as I described earlier.  Other
> solutions are welcome, but that's all I can think of.

Perhaps I'll just set en_GB.UTF-8 as my default and US as the
additional, rather than the other way round as at present.
But thanks for the description earlier.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#207234

FromVincent Lefevre <vincent@vinc17.net>
Date2019-04-10 13:40 +0200
Message-ID<xLjK9-So-11@gated-at.bofh.it>
In reply to#207197
On 2019-04-09 13:28:40 -0500, David Wright wrote:
> 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".

UTC0 appears to be safer. Here's what I got in the past:

patate:~> TZ=UTC date; TZ=UTC0 date
Mon Aug 13 00:35:53 CEST 2018
Sun Aug 12 22:35:53 UTC 2018

just because a script was writing to /etc/localtime.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

[toc] | [prev] | [next] | [standalone]


#207251

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2019-04-10 18:00 +0200
Message-ID<xLnNL-3iR-9@gated-at.bofh.it>
In reply to#207234
On Wed 10 Apr 2019 at 13:26:39 (+0200), Vincent Lefevre wrote:
> On 2019-04-09 13:28:40 -0500, David Wright wrote:
> > 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".
> 
> UTC0 appears to be safer. Here's what I got in the past:
> 
> patate:~> TZ=UTC date; TZ=UTC0 date
> Mon Aug 13 00:35:53 CEST 2018
> Sun Aug 12 22:35:53 UTC 2018
> 
> just because a script was writing to /etc/localtime.

If that's the way you "fix" your broken configuration, why not use
a more indicative string so that people know your system's broken:

$ date; TZ=UTC date; TZ=UTC0 date; TZ=XXX date; TZ=XXX0 date
Wed Apr 10 10:48:36 CDT 2019
Wed Apr 10 15:48:36 UTC 2019
Wed Apr 10 15:48:36 UTC 2019
Wed Apr 10 15:48:36 XXX 2019
Wed Apr 10 15:48:36 XXX 2019
$ 

Cheers,
David.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.debian.user


csiph-web