Web lists-archives.com

Re: date(1) in stretch and buster




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@xxxxxxxxxx> - 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)