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

Re: buster netinst timezone



On Fri 13 Sep 2019 at 08:35:51 (-0400), Michael Stone wrote:
> On Sun, Sep 01, 2019 at 08:32:56PM -0500, David Wright wrote:
> > On Wed 28 Aug 2019 at 14:08:47 (-0400), Michael Stone wrote:
> > > On Wed, Aug 28, 2019 at 12:25:32PM -0500, David Wright wrote:
> > > > On Mon 12 Aug 2019 at 08:38:47 (-0400), Greg Wooledge wrote:
> > > > > The first one is the /etc/timezone file, which as you say, is a
> > > > > simple text file that a (root) user can edit.  I believe this is the
> > > > > backward-compatibility one.
> > > >
> > > > And that's the one I find useful, in that a lot of applications honour
> > > > a value for TZ, which needs to be the text version. I always have a
> > > > link to /etc/timezone as ~/.timezone, and TZ is set to its value in
> > > > my startup files, which makes it easy to run a session in a
> > > > contradictory timezone if I wish.
> > > >
> > > > > The second one is the /etc/localtime symbolic link, which needs to point
> > > > > to an existing binary time zone data file in /usr/share/zoneinfo.  The
> > > > > symbolic link can be re-pointed by hand; the binary data file should not
> > > > > be edited by hand.
> > > >
> > > > I assume the system is interested in this one because it needs the
> > > > actual rules and not just the name of the timezone. Otherwise the
> > > > system wouldn't be able to junp the clocks at the appropriate times.
> > > 
> > > You're making a distinction that doesn't exist. The text value in TZ or
> > > /etc/timezone should match a filename in /usr/share/zoneinfo. If it
> > > doesn't then you'll get incons[is]tent dates.
> > 
> > Well, yes, I'm assuming that users are playing fair and stick to
> > using filenames that exist and not, say, TZ=Texas/Paris. Further
> > down my post (2 back) it said "… the string UTC
> > (the alternatives are simply the names of the files in
> > /usr/share/zoneinfo, including subdirectories)." Is that the
> > distinction you meant?
> > 
> > So I'm not sure whether that was what you were trying to say;
> 
> I'm saying that /etc/timezone and /etc/localtime should be consistent
> and valid, in which case they both do the same thing. There isn't one
> that uses "the actual rules and not just the name of the timezone" and
> one that doesn't.

Perhaps we'll just have to beg to differ. /etc/timezone looks very much
like a name to me.

$ ls -l /etc/localtime /etc/timezone
lrwxrwxrwx 1 root root 35 Aug 14 23:02 /etc/localtime -> /usr/share/zoneinfo/America/Chicago
-rw-r--r-- 1 root root 16 Aug 14 23:02 /etc/timezone
$ cat /etc/timezone
America/Chicago
$ od -c /etc/timezone
0000000   A   m   e   r   i   c   a   /   C   h   i   c   a   g   o  \n
0000020
$ od -c /etc/localtime
0000000   T   Z   i   f   2  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000020  \0  \0  \0  \0  \0  \0  \0  \a  \0  \0  \0  \a  \0  \0  \0  \0
0000040  \0  \0  \0 354  \0  \0  \0  \a  \0  \0  \0 030 200  \0  \0  \0
0000060 236 246   , 200 237 272 371   p 240 206 016 200 241 232 333   p
0000100 242 313   t  \0 243 203 367 360 244   E 322 200 245   c 331 360
 … … …
0006620 002 001 002 001 002 001 002 001 002 377 377 255 324  \0  \0 377
0006640 377 271 260 001 004 377 377 253 240  \0  \b 377 377 271 260  \0
0006660  \f 377 377 271 260 001 020 377 377 271 260 001 024 377 377 253
0006700 240  \0  \b   L   M   T  \0   C   D   T  \0   C   S   T  \0   E
0006720   S   T  \0   C   W   T  \0   C   P   T  \0  \0  \0  \0  \0  \0
0006740 001  \0  \0  \0  \0  \0  \0 001  \0  \n   C   S   T   6   C   D
0006760   T   ,   M   3   .   2   .   0   ,   M   1   1   .   1   .   0
0007000  \n
0007001
$ 

Cheers,
David.


Reply to: