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 for working on different timezones #614

Merged
merged 2 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion divert_sim/divert_sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ time_t parse_date(const char *dateStr)
time.tm_min = m; // 0-59
time.tm_sec = s; // 0-61 (0-60 in C++11)

return mktime(&time);
return timegm(&time);
}

int get_watt(const char *val)
Expand Down
2 changes: 1 addition & 1 deletion divert_sim/runall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function test
shift
echo "Testing $file"
./divert_sim $@ < data/$file.csv > output/$file.csv
diff --side-by-side --suppress-common-lines snapshot/$file.csv output/$file.csv
diff -Z --side-by-side --suppress-common-lines snapshot/$file.csv output/$file.csv
if [ $? -eq 0 ]; then
echo "Test $file passed"
((PASS+=1))
Expand Down