We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a98bc4e commit 604e867Copy full SHA for 604e867
src/utils/pgut.c
@@ -752,6 +752,7 @@ parse_time(const char *value, time_t *result)
752
int fields_num,
753
tz = 0,
754
i;
755
+ bool tz_set = false;
756
char *tmp;
757
struct tm tm;
758
char junk[2];
@@ -824,6 +825,8 @@ parse_time(const char *value, time_t *result)
824
825
if (*value == '-')
826
tz = -tz;
827
828
+ tz_set = true;
829
+
830
fields_num++;
831
value = cp;
832
}
@@ -865,7 +868,7 @@ parse_time(const char *value, time_t *result)
865
868
*result = mktime(&tm);
866
869
867
870
/* adjust time zone */
- if (tz != 0)
871
+ if (tz_set)
872
{
873
time_t ltime = time(NULL);
874
struct tm *ptm = gmtime(<ime);
0 commit comments