Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

timeZones issue #18

Open
loverboyritesh opened this issue Jul 23, 2020 · 2 comments
Open

timeZones issue #18

loverboyritesh opened this issue Jul 23, 2020 · 2 comments

Comments

@loverboyritesh
Copy link

2 points ///
1: negative time zones not working
2: 30 mins time zones like -5.30 not working ///

Is it just with me or anyone else tried and facing similar issues //

@smithellis
Copy link

If you are in a timezone that is negative you need to patch the file up to allow the integer to be signed. As it is set up, it only works with unsigned ints. I did a find and replace to remove "unsigned" from everywhere it existed except for here:

while ((unsigned)(days += (LEAP_YEAR(year) ? 366 : 365)) <= time) { year++; }

@St3v3caldwell
Copy link

If you change unsigned to signed it you'll be able to enter a negative time zone. I changed line 20 to a signed long from unsigned:
signed long timeZone = -5.0;
and line 244:
void convertTime(int32_t time) { //changed to int32_t from uint32_t
Your serial monitor will show the correct hour, date, time and all that.
hope this helps
Steve

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants