Skip to content

Commit 135feea

Browse files
committed
Fix random hour of time shift.
What appeared to be a random daylight savings time issue, was a failure to zero out a struct tm. Appears to be fixed.
1 parent f63e20d commit 135feea

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

dataIO.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,9 +897,8 @@ void GetTimeInterval(int InputFile, DATAFILE_INFO *curFile, int timeVarID, size_
897897
if (getNCattr(InputFile, timeVarID, "strptime_format", format) == false)
898898
format = "seconds since %F %T %z";
899899

900+
memset(&stm, 0, sizeof(struct tm));
900901
strptime(units.c_str(), format.c_str(), &stm);
901-
setenv("TZ", "", 1);
902-
tzset();
903902
time_t start = mktime(&stm) + first - timezone;
904903
time_t end = mktime(&stm) + last - timezone;
905904

fbr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static String fallback_resources[] =
5454
"*XmTextField.foreground: black",
5555
"*XmForm.horizontalSpacing: 4",
5656
"*XmForm.verticalSpacing: 4",
57-
"*topLevelShell.title: ncplot 4.11.4",
57+
"*topLevelShell.title: ncplot 4.12.0",
5858
"*topLevelShell.iconName: ncplot",
5959
"*topLevelShell.allowShellResize: True",
6060
"*topLevelShell.x: 50",

0 commit comments

Comments
 (0)