Skip to content

Commit bfcacf7

Browse files
authored
Merge pull request #614 from OpenEVSE/divert_sim_timezone_fix
Fix for working on different timezones
2 parents 037f845 + 776ee70 commit bfcacf7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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)

divert_sim/runall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function test
99
shift
1010
echo "Testing $file"
1111
./divert_sim $@ < data/$file.csv > output/$file.csv
12-
diff --side-by-side --suppress-common-lines snapshot/$file.csv output/$file.csv
12+
diff -Z --side-by-side --suppress-common-lines snapshot/$file.csv output/$file.csv
1313
if [ $? -eq 0 ]; then
1414
echo "Test $file passed"
1515
((PASS+=1))

0 commit comments

Comments
 (0)