Timezone error in locations with specific POSIX TZ format

chr1st0s
Posts: 15
Joined: Fri Nov 01, 2019 10:05 am

Timezone error in locations with specific POSIX TZ format

Postby chr1st0s » Wed Nov 25, 2020 1:17 pm

Hi,

IDF v3.3

Since 31st of Oct 2020, we are experiencing system time issues for specific timezones.

After getting the UTC time from the SNTP server, we apply the timezone configuration as it is produced by the "zdump" or "/usr/shared/zoneinfo/posix/*/*".

Code: Select all

setenv ("TZ", tz_var, 1);
tzset();
Any timezone with POSIX format that starts with "<+/-XX>*" failed to convert correctly from summer to winter time, even if DST is not required for the location.

A simple example is Asia/Singapore with tz_var="<+8>-8", which currently (25th Nov 2020) displays 8 hours behind GMT instead of 8 hours forwards.
- Should we fix such cases by changing the POSIX TZ format ourselves? e.g. Asia/Singapore from <+8>-8 to GMT-8 ?
- Is this a bug in the ESP-IDF or I am missing a configuration?
- Is it a common issue with POSIX TZ strings? Are there any default/standard solutions?

The situation is getting more complicated with locations such as Pacific/Fiji
with tz_var="<+12>-12<+13>,M11.1.0,M1.2.1/147", for which I have no solution yet.

Any suggestions on how to fix this issue?

Thanks,
Christos

Who is online

Users browsing this forum: aapee-jcv, Google [Bot] and 421 guests