wfdudley / T-watch-2020

a watch project for the TTGO T-watch-2020 version 1
BSD 3-Clause "New" or "Revised" License
84 stars 27 forks source link

Issues timezone #19

Closed FedericoBusero closed 3 years ago

FedericoBusero commented 3 years ago

When using the firmware in the time zone TZ_CET, the time is changed to some strange time each time a wifi connection is made. The cause is a signed/unsigned bug: timezones are specified in unsigned 32-bit integer values, but the function atol is used (and this is a signed function).

tzonestr = 2730856407
best strength = -49, best ssid = xxxx, tz = 2147483647 = 7fffffff

Next to that in the struct WiFiAP, the timezone is specified signed, which could cause bugs.

wfdudley commented 3 years ago

Excellent. Thank you.