[tex-live] tlmgr

Reinhard Kotucha reinhard.kotucha at web.de
Fri Nov 2 23:57:46 CET 2012


On 2012-11-01 at 23:14:49 +0900, Norbert Preining wrote:

 > Indeed. I assume now that the time call used by perl links to the
 > syscall and that is depending on the current summer/normal time 
 > settings.

Hi Norbert,
there is no black magic and as far as I can deduce from the code,
neither the installer nor tlmgr have problems with DST/standard time
transitions.

Unix uses UTC internally throughout the system.  Conversion to local
time takes place when times are displayed to users.  And only there
it make sense.  Example:

  $ touch foo

  $ ls -l foo
  -rw-r--r-- 1 reinhard users 0 Nov  2 22:23 foo

  $ TZ=/usr/share/zoneinfo/Asia/Tokyo ls -l foo
  -rw-r--r-- 1 reinhard users 0 Nov  3 06:23 foo

The time stamp in the inode is in UTC, the conversion to local time is
done by ls (and system libraries).  

The function TLUtils::time_estimate() is using the built-in function
time(), which returns the number of seconds since 1970-01-01 00:00 UTC.
This function always yields correct results because it depends on UTC
entirely...   

...except, of course, if an ntp client changes the system time while
tlmgr is running, as in Herbert's case.

As far as I can see,  the installer and tlmgr are using Perl's
localtime() function only in order to insert human readable time
stamps into log files, which is safe and desired.

In order to avoid sudden clock changes, I can only second Zdeněk's
proposal: Run /sbin/hwclock --systohc from time to time.

Regards, 
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------



More information about the tex-live mailing list