Skip to content

Commit 122d64c

Browse files
author
Martin Gallo
committed
Using UTC instead of local time
1 parent 198fa7b commit 122d64c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pysap/SAPCAR.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def timestamp(self):
252252
:return: timestamp in human-readable format
253253
:rtype: string
254254
"""
255-
return datetime.fromtimestamp(self._file_format.timestamp).strftime('%d %b %Y %H:%M')
255+
return datetime.utcfromtimestamp(self._file_format.timestamp).strftime('%d %b %Y %H:%M')
256256

257257
@timestamp.setter
258258
def timestamp(self, timestamp):

tests/sapcar_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
class PySAPCARTest(unittest.TestCase):
3232

3333
test_filename = "test_string.txt"
34-
test_timestamp = "01 Dec 2015 19:48"
34+
test_timestamp = "01 Dec 2015 22:48"
3535
test_permissions = "-rw-rw-r--"
3636
test_string = "The quick brown fox jumps over the lazy dog"
3737

0 commit comments

Comments
 (0)