Comparison

util/datetime.lua @ 4250:7b456af75c77

util.datetime: Fix timestamp parsing when in DST (thanks xnyhps)
author Matthew Wild <mwild1@gmail.com>
date Fri, 15 Apr 2011 22:39:53 +0100
parent 3643:2dc342a13f35
child 5107:6ac790efecd3
comparison
equal deleted inserted replaced
4249:896e8793e7a4 4250:7b456af75c77
47 h, m = tonumber(h), tonumber(m); 47 h, m = tonumber(h), tonumber(m);
48 tzd_offset = h * 60 * 60 + m * 60; 48 tzd_offset = h * 60 * 60 + m * 60;
49 if sign == "-" then tzd_offset = -tzd_offset; end 49 if sign == "-" then tzd_offset = -tzd_offset; end
50 end 50 end
51 sec = (sec + time_offset) - tzd_offset; 51 sec = (sec + time_offset) - tzd_offset;
52 return os_time({year=year, month=month, day=day, hour=hour, min=min, sec=sec}); 52 return os_time({year=year, month=month, day=day, hour=hour, min=min, sec=sec, isdst=false});
53 end 53 end
54 end 54 end
55 end 55 end
56 56
57 return _M; 57 return _M;