Changed get_timestamp to return UTC time
authorAleksey Maksimov <ctpeko3a@gmail.com>
Wed, 12 Jun 2013 14:53:43 +0000 (22:53 +0800)
committerAleksey Maksimov <ctpeko3a@gmail.com>
Wed, 12 Jun 2013 14:53:43 +0000 (22:53 +0800)
jenkinsapi/build.py

index b35e653..a787ba2 100644 (file)
@@ -268,8 +268,11 @@ class Build(JenkinsBase):
         return all_actions
 
     def get_timestamp(self):
+        '''
+        Returns build timestamp in UTC
+        '''
         # Java timestamps are given in miliseconds since the epoch start!
-        return datetime.datetime(*time.localtime(self._data['timestamp']/1000.0)[:6])
+        return datetime.datetime(*time.gmtime(self._data['timestamp']/1000.0)[:6])
 
     def stop(self):
         """