[Dev-luatex] os.setenv()

luigi scarso luigi.scarso at gmail.com
Fri Feb 21 23:00:58 CET 2020


On Fri, Feb 21, 2020 at 10:50 PM Reinhard Kotucha <reinhard.kotucha at web.de>
wrote:

> Hi,
> I just tried this with texlua 1.10.0:
>
> --------------------------------------------
>   local function time_of_day (TZ)
>     os.setenv('TZ', TZ)
>     local time = os.gettimeofday()
>     print(os.date('%c', math.floor(time)))
>   end
>
>   time_of_day ('America/New_York')
>   time_of_day ('Europe/Paris')
>   time_of_day ('Asia/Tokyo')
> --------------------------------------------
>
> It seems that os.setenv() is only executed once and all results are
> in Eastern Standard Time:
>
>   Fri Feb 21 16:37:13 2020
>   Fri Feb 21 16:37:13 2020
>   Fri Feb 21 16:37:13 2020
>
> When I call "time_of_day ('Asia/Tokyo')" first I get
>
>   Sat Feb 22 06:39:46 2020
>   Sat Feb 22 06:39:46 2020
>   Sat Feb 22 06:39:46 2020
>
> Is it possible to fix this behavior?
>


hm, just to be sure...  how do you run your example ?


-- 
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/dev-luatex/attachments/20200221/7ca8404d/attachment.htm>


More information about the dev-luatex mailing list