Skip to content

Commit fdd1110

Browse files
committed
Fix for working on different timezones
maketime uses local time so changed to timegm so the input and output times are GMT
1 parent f345ed1 commit fdd1110

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

divert_sim/divert_sim.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ time_t parse_date(const char *dateStr)
7070
time.tm_min = m; // 0-59
7171
time.tm_sec = s; // 0-61 (0-60 in C++11)
7272

73-
return mktime(&time);
73+
return timegm(&time);
7474
}
7575

7676
int get_watt(const char *val)

0 commit comments

Comments
 (0)