[Buildbot-commits] buildbot/buildbot/test test_vc.py,1.54,1.55

Brian Warner warner at users.sourceforge.net
Fri May 19 07:44:24 UTC 2006


Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23702/buildbot/test

Modified Files:
	test_vc.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-541
Creator:  Brian Warner <warner at lothar.com>

clean up timezone-string usage

	* buildbot/scripts/tryclient.py (CVSExtractor.getBaseRevision):
	use a timezone string of +0000 and gmtime, since this timestamp is
	sent to a buildmaster and %z is broken.

	* buildbot/test/test_vc.py (CVSHelper.getdate): use no timezone
	string and localtime, since this timestamp will only be consumed
	locally, and %z is broken.

	* buildbot/slave/commands.py (CVS.parseGotRevision): use +0000 and
	gmtime, since this timestamp is returned to the buildmaster, and
	%z is broken.


Index: test_vc.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- test_vc.py	19 May 2006 06:28:10 -0000	1.54
+++ test_vc.py	19 May 2006 07:44:22 -0000	1.55
@@ -1049,6 +1049,13 @@
         return (True, None)
 
     def getdate(self):
+        # this timestamp is eventually passed to CVS in a -D argument, and
+        # strftime's %z specifier doesn't seem to work reliably (I get +0000
+        # where I should get +0700 under linux sometimes, and windows seems
+        # to want to put a verbose 'Eastern Standard Time' in there), so
+        # leave off the timezone specifier and treat this as localtime. A
+        # valid alternative would be to use a hard-coded +0000 and
+        # time.gmtime().
         return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
 
     def createRepository(self):





More information about the Commits mailing list