Le jeu. 4 févr. 2021 à 08:06, Andrey Nikitin <andrey.d.niki...@gmail.com> a
écrit :

> Package: nodejs
> Version: 12.20.1~dfsg-3
> Severity: normal
>
> Hi.
>
> Since "Dec 27 2020" TZ Europe/Volgograd = Europe/Moscow,
> with +03h offset.
>
> But nodejs use old (now wrong) +04h offset.
>
> $ env TZ="Europe/Moscow" nodejs -e 'console.log((new
> Date().getTimezoneOffset())/60)'
> -3
> $ nodejs -e 'console.log((new Date().getTimezoneOffset())/60)'
> -4
> $ env TZ="Europe/Volgograd" nodejs -e 'console.log((new
> Date().getTimezoneOffset())/60)'
> -4
>
> $ zdump -c 2020,2021 -V /usr/share/zoneinfo/Europe/Volgograd
> /usr/share/zoneinfo/Europe/Volgograd  Sat Dec 26 21:59:59 2020 UT = Sun
> Dec 27 01:59:59 2020 +04 isdst=0 gmtoff=14400
> /usr/share/zoneinfo/Europe/Volgograd  Sat Dec 26 22:00:00 2020 UT = Sun
> Dec 27 01:00:00 2020 +03 isdst=0 gmtoff=10800
>
> $ date +"%z (%Z)"
> +0300 (+03)
>
> $ strace nodejs -e 'console.log((new Date().getTimezoneOffset())/60)' 2>&1
> | grep zone
> stat("/usr/share/zoneinfo-icu/44/le/zoneinfo64.res", 0x7ffea7585330) = -1
> ENOENT (Нет такого файла или каталога)
> readlink("/etc/localtime", "../usr/share/zoneinfo/Europe/Vol"..., 4095) =
> 38
> stat("/usr/share/zoneinfo-icu/44/le/timezoneTypes.res", 0x7ffea7583570) =
> -1 ENOENT (Нет такого файла или каталога)



actually while icu fails to find files in zoneinfo-icu (i suppose it's a
compatibility thing with ubuntu),
it does parse /usr/share/zoneinfo/Europe/Volgograd
so i guess something's wrong in icu when it does that part.

Also i checked other browsers and they all have the same "issue":
- google chrome, official 88 release
- firefox

but they don't all depend on icu ?

Also i checked upstream nodejs version and
Welcome to Node.js v12.20.1.
Type ".help" for more information.
> var d = new Date("2021-04-13T00:00:00.000+08:00");
undefined
> d.toLocaleString('en-US', { timeZone: 'Europe/Moscow' })
'4/12/2021, 7:00:00 PM'
> d.toLocaleString('en-US', { timeZone: 'Europe/Volgograd' })
'4/12/2021, 8:00:00 PM'

bug is there too.


Jérémy

Reply via email to