diff --git a/src/standard.c b/src/standard.c index 08a2c0d46..442348c4a 100644 --- a/src/standard.c +++ b/src/standard.c @@ -3018,11 +3018,12 @@ const char *get_gmt_offset(time_t t, struct tm *tm) } else { *gmt_offset = '+'; } + diff %= 86400U; diff /= 60; /* Convert to minutes */ snprintf(gmt_offset+1, 4+1, "%02d%02d", diff/60, diff%60); } - return gmt_offset; + return gmt_offset; } /* gmt2str_log: write a date in the format :