Software /
code /
prosody
Changeset
3643:2dc342a13f35
util.datetime: Fix so that the timestamp returned is always in UTC, timezone offsets were going in the wrong direction
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 27 Nov 2010 01:30:56 +0000 |
parents | 3642:ed80c4c56b9c |
children | 3644:22fc2063b824 |
files | util/datetime.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/datetime.lua Sat Nov 27 01:22:43 2010 +0000 +++ b/util/datetime.lua Sat Nov 27 01:30:56 2010 +0000 @@ -48,7 +48,7 @@ tzd_offset = h * 60 * 60 + m * 60; if sign == "-" then tzd_offset = -tzd_offset; end end - sec = sec + time_offset + tzd_offset; + sec = (sec + time_offset) - tzd_offset; return os_time({year=year, month=month, day=day, hour=hour, min=min, sec=sec}); end end