#2362: Timezone problem with HgPoller
---------------------+--------------------
Reporter: gracinet | Owner:
Type: defect | Status: new
Priority: major | Milestone: 0.8.7
Version: master | Resolution:
Keywords: |
---------------------+--------------------
Comment (by gracinet):
Okay, my bad, a typical case of double correction:
{{{
>>> time.gmtime(1346158664)
time.struct_time(tm_year=2012, tm_mon=8, tm_mday=28, tm_hour=12,
tm_min=57, tm_sec=44, tm_wday=1, tm_yday=241, tm_isdst=0)
>>> time.localtime(1346158664)
time.struct_time(tm_year=2012, tm_mon=8, tm_mday=28, tm_hour=14,
tm_min=57, tm_sec=44, tm_wday=1, tm_yday=241, tm_isdst=1)
}}}
So, the first number of hg log is the UTC timestamp (and the general
convention is that timestamps are always UTC, since the epoch is expressed
in UTC).
The second number is an indication of the original timezone, of which
buildbot does not care. By summing the two, !HgPoller is plain wrong.
Prior checkings were done with ``datetime.fromtimestamp`` which actually
converts to local time, but as a naive datetime instance, whence the
confusion. Should have read more carefully the doc, sorry.
I will propose a fix ASAP.
--
Ticket URL: <http://trac.buildbot.net/ticket/2362#comment:3>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits