1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

Help newlib TZ parser (#7699)

* TZ: help newlib parser

Timezones coded with numeric abbreviations <±nn>±nn<±nn>[±nn][,...] are incorrectly parsed
by newlib's TZ parser.
Replacing <±nn> occurences by UNK allows newlib's TZ parser to nicely interpret all timezones.
Detailed explanation in https://github.com/earlephilhower/newlib-xtensa/issues/12
This commit is contained in:
david gauchard
2020-11-10 23:35:04 +01:00
committed by GitHub
parent c919f61169
commit 4de681b504
2 changed files with 203 additions and 201 deletions

View File

@ -24,7 +24,7 @@ values=$tz_tmpdir/values.txt
wget -O $input $csv || curl $csv > $input
sed -e 's/^[^,]*,//g' -e 's,^,PSTR(,g' -e 's,$,),g' < $input > $values
sed -e 's/^[^,]*,//g' -e 's,^,PSTR(,g' -e 's,$,),g' -e 's,<[^>]*>,UNK,g' < $input > $values
sed -e 's/^\([^,]*\),.*/#define TZ_\1/g' -e 's,["],,g' < $input | tr '/\-+' '_mp' > $names
(
@ -36,7 +36,8 @@ cat << EOF
// $(date -u)
//
// This database is autogenerated from IANA timezone database
// https://www.iana.org/time-zones
// ${csv}
// (using https://www.iana.org/time-zones)
// and can be updated on demand in this repository
// or by yourself using the above script