Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

🐛 fix timezone that was not used #3450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions examples/Smooth Graphics/Anti-aliased_Clock/NTP_Time.h
Original file line number Diff line number Diff line change
@@ -253,19 +253,20 @@ void decodeNTP(void)

timeValid = true;

time_t local = TIMEZONE.toLocal(utc);
// Print the hour, minute and second:
Serial.print("Received NTP UTC time : ");
Serial.print("Received NTP Local time : ");

uint8_t hh = hour(utc);
uint8_t hh = hour(local);
Serial.print(hh); // print the hour (86400 equals secs per day)

Serial.print(':');
uint8_t mm = minute(utc);
uint8_t mm = minute(local);
if (mm < 10 ) Serial.print('0');
Serial.print(mm); // print the minute (3600 equals secs per minute)

Serial.print(':');
uint8_t ss = second(utc);
uint8_t ss = second(local);
if ( ss < 10 ) Serial.print('0');
Serial.println(ss); // print the second