[Buildbot-commits] [Buildbot] #2522: test_changes_mail_CVSMaildirSource fails in some timezones

Buildbot trac trac at buildbot.net
Sat Sep 7 22:14:21 UTC 2013


#2522: test_changes_mail_CVSMaildirSource fails in some timezones
----------------------+------------------------
Reporter:  rutsky     |       Owner:
    Type:  undecided  |      Status:  new
Priority:  major      |   Milestone:  undecided
 Version:  master     |  Resolution:
Keywords:             |
----------------------+------------------------

Comment (by rutsky):

 Replying to [comment:3 dustin]:
 > Can one of you folks let me know how the following script behaves?
 > {{{
 > #!/usr/bin/env python
 > import datetime
 > import email.utils
 >
 > dateTuple = email.utils.parsedate_tz('Sat, 07 Aug 2010 11:11:49 +0000')
 > print dateTuple
 > when = email.utils.mktime_tz(dateTuple)
 > print when
 > theTime = datetime.datetime.utcfromtimestamp(float(when))
 > print theTime
 > rev = theTime.strftime('%Y-%m-%d %H:%M:%S')
 > print rev
 > }}}

 Here is output on my machine:
 {{{
 (2010, 8, 7, 11, 11, 49, 0, 1, -1, 0)
 1281183109.0
 2010-08-07 12:11:49
 2010-08-07 12:11:49
 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2522#comment:4>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list