Software /
code /
prosody
Changeset
9699:588ec80f1677
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Dec 2018 23:06:02 +0100 |
parents | 9697:2db341f7c5fc (current diff) 9698:e616c37756b3 (diff) |
children | 9700:f540bb378501 |
files | |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/datetime.lua Sun Dec 09 20:53:33 2018 +0100 +++ b/util/datetime.lua Sun Dec 09 23:06:02 2018 +0100 @@ -38,7 +38,8 @@ local year, month, day, hour, min, sec, tzd; year, month, day, hour, min, sec, tzd = s:match("^(%d%d%d%d)%-?(%d%d)%-?(%d%d)T(%d%d):(%d%d):(%d%d)%.?%d*([Z+%-]?.*)$"); if year then - local time_offset = os_difftime(os_time(os_date("*t")), os_time(os_date("!*t"))); -- to deal with local timezone + local now = os_time(); + local time_offset = os_difftime(os_time(os_date("*t", now)), os_time(os_date("!*t", now))); -- to deal with local timezone local tzd_offset = 0; if tzd ~= "" and tzd ~= "Z" then local sign, h, m = tzd:match("([+%-])(%d%d):?(%d*)");