diff options
Diffstat (limited to 'src/timezone/strftime.c')
-rw-r--r-- | src/timezone/strftime.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/timezone/strftime.c b/src/timezone/strftime.c index 4a0a01db651..ab8f60e9c8f 100644 --- a/src/timezone/strftime.c +++ b/src/timezone/strftime.c @@ -1,4 +1,4 @@ -/* Convert a broken-down time stamp to a string. */ +/* Convert a broken-down timestamp to a string. */ /* * Copyright 1989 The Regents of the University of California. @@ -44,7 +44,6 @@ #include <locale.h> #include "private.h" -#include "tzfile.h" struct lc_time_T @@ -452,11 +451,17 @@ _fmt(const char *format, const struct pg_tm * t, char *pt, const char *ptlim, { long diff; char const *sign; + bool negative; if (t->tm_isdst < 0) continue; diff = t->tm_gmtoff; - if (diff < 0) + negative = diff < 0; + if (diff == 0) + { + negative = t->tm_zone[0] == '-'; + } + if (negative) { sign = "-"; diff = -diff; |