ropg / ezTime

ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.
MIT License
327 stars 92 forks source link

`hour()` does not work as expected #137

Open milkpirate opened 2 years ago

milkpirate commented 2 years ago

Hey, could you tell me why the last call to hour does not deliver 21? What am I doing wrong?

Serial<<BerlinTz.dateTime(LAST_READ)<<endl;

auto adjustedUTC = BerlinTz.tzTime(TIME_NOW, UTC_TIME) + 150;

Serial<<BerlinTz.dateTime(adjustedUTC, LOCAL_TIME)<<endl;
Serial<<BerlinTz.hour(adjustedUTC, LOCAL_TIME)<<endl;
Thursday, 20-Jan-2022 21:03:35 CET
Thursday, 20-Jan-2022 21:06:05 CET
20