mailing list of musl libc
 help / color / mirror / code / Atom feed
* Bug in timezone handling (new zonename format like '<+04>-4' )
@ 2016-03-31 15:50 Hannu Nyman
  2016-03-31 16:06 ` Rich Felker
  0 siblings, 1 reply; 4+ messages in thread
From: Hannu Nyman @ 2016-03-31 15:50 UTC (permalink / raw)
  To: musl

The IANA timezone zoneinfo maintainers have decided to introduce new 
timezones in a simplified format with 2016b zoneinfo.
No more invented name strings, but just the time offset inside <...>
This seems to break musl.

http://mm.icann.org/pipermail/tz-announce/2016-March/000036.html
      New zones Europe/Astrakhan and Europe/Ulyanovsk ... Asia/Barnaul ...
      As a trial of a new system that needs less information to be made up, 
the new zones use numeric time zone abbreviations like "+04" instead of 
invented abbreviations like "ASTT".

I have tested with Openwrt trunk using musl (with Linux kernel 4.1) and older 
uClibc-based Openwrt CC15.05.1.
The uClibc-based system uses the new zones ok, but the musl-based build 
behaves badly, as it defaults to GMT and shows the zonename as '+04>-4'. 
(This is when full zoneinfo files are not installed and just the TZ variable 
is used.)

Examples at https://github.com/openwrt/luci/issues/675

(note: Openwrt patches musl to store TZ in /etc/TZ instead of an env 
variable, but that should have no impact in the displayed timezone.)

Example with musl:

old zone is ok:
Europe/Helsinki
root@OpenWrt:~# cat /etc/TZ
EET-2EEST,M3.5.0/3,M10.5.0/4
root@OpenWrt:~# uptime
  11:00:52 up 18:17,  load average: 0.43, 0.13, 0.11
root@OpenWrt:~# date
Wed Mar 30 11:00:55 EEST 2016

"new zone" is handle wrongly:
Europe/Astrakhan
root@OpenWrt:~# cat /etc/TZ
<+04>-4
root@OpenWrt:~# uptime
  08:02:52 up 18:19,  load average: 0.17, 0.18, 0.13
root@OpenWrt:~# date
Wed Mar 30 08:02:59 +04>-4 2016
(That should be Helsinki+1  (= +2 -DST) = 12:02:59)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-19  6:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-31 15:50 Bug in timezone handling (new zonename format like '<+04>-4' ) Hannu Nyman
2016-03-31 16:06 ` Rich Felker
2016-03-31 16:47   ` Hannu Nyman
2016-10-19  6:40     ` Hannu Nyman

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).