bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] ⎕TZ and ⎕TS


From: Kacper Gutowski
Subject: Re: [Bug-apl] ⎕TZ and ⎕TS
Date: Mon, 27 Jan 2014 21:49:41 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On 2014-01-27 17:26:56, Juergen Sauermann wrote:
> should be fixed in SVN 108.

It appears to work now, but it will give incorrect results in summer in
zones where daylight saving time is used.  Maybe something along the
lines of difftime(mktime(localtime(…)), mktime(gmtime(…))) would work
on all target systems?


By the way, are there any idioms making use of that silent failure when
⎕TZ is assigned value outside [¯12, 12]?

According to APL2 manual setting ⎕TZ←14 should be a no-op, and so it is in
GNU APL.  But IBM has choosen to ignore existence of valid timezones
outside that range.  In fact, currently they get detected correctly but
once changed it can't be set back because of this limitation on assignment.

$ TZ=Pacific/Kiritimati apl --silent
      ⎕TZ
14
      ⎕TZ←1
      ⎕TZ←14
      ⎕TZ
1

It works as documented, but is it needed?


-k



reply via email to

[Prev in Thread] Current Thread [Next in Thread]