Skip to content

Commit

Permalink
Check for DST if set via NTP
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxineMuster authored Nov 14, 2024
1 parent 5984c10 commit e5f12c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/driver/drv_deviceclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,17 @@ int CLOCK_GetYear() {


#if ENABLE_LOCAL_CLOCK
void CLOCK_setDeviceTime(uint32_t time)
void CLOCK_setDeviceTime(uint32_t time, bool testdst=1)
{
// done in CMD_Init_Delayed() in cmd_main.c
// if (g_epochOnStartup < 10) CLOCK_Init();
g_epochOnStartup = time - g_secondsElapsed;
#if ENABLE_LOCAL_CLOCK_ADVANCED
// if we don't check for DST later (this is done e.g. when time is set via PMNTP) check for DST
// used e.g. if time is set via NTP, to make sure everything is set correctly
if (testdst) testNsetDST(time);
#endif

}

void CLOCK_setDeviceTimeOffset(int offs)
Expand Down

0 comments on commit e5f12c3

Please sign in to comment.