From 135feea0c50db3b657a4bf0d9f9db24197c1b6a0 Mon Sep 17 00:00:00 2001 From: Chris Webster Date: Thu, 19 Sep 2024 10:20:04 -0600 Subject: [PATCH] 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. --- dataIO.c | 3 +-- fbr.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dataIO.c b/dataIO.c index 555212d..ffbfea2 100644 --- a/dataIO.c +++ b/dataIO.c @@ -897,9 +897,8 @@ void GetTimeInterval(int InputFile, DATAFILE_INFO *curFile, int timeVarID, size_ if (getNCattr(InputFile, timeVarID, "strptime_format", format) == false) format = "seconds since %F %T %z"; + memset(&stm, 0, sizeof(struct tm)); strptime(units.c_str(), format.c_str(), &stm); - setenv("TZ", "", 1); - tzset(); time_t start = mktime(&stm) + first - timezone; time_t end = mktime(&stm) + last - timezone; diff --git a/fbr.h b/fbr.h index 9ab5a6e..e68ee1c 100644 --- a/fbr.h +++ b/fbr.h @@ -54,7 +54,7 @@ static String fallback_resources[] = "*XmTextField.foreground: black", "*XmForm.horizontalSpacing: 4", "*XmForm.verticalSpacing: 4", - "*topLevelShell.title: ncplot 4.11.4", + "*topLevelShell.title: ncplot 4.12.0", "*topLevelShell.iconName: ncplot", "*topLevelShell.allowShellResize: True", "*topLevelShell.x: 50",