diff --git a/pysap/SAPCAR.py b/pysap/SAPCAR.py index f40336e..964d9c3 100644 --- a/pysap/SAPCAR.py +++ b/pysap/SAPCAR.py @@ -252,7 +252,7 @@ def timestamp(self): :return: timestamp in human-readable format :rtype: string """ - return datetime.fromtimestamp(self._file_format.timestamp).strftime('%d %b %Y %H:%M') + return datetime.utcfromtimestamp(self._file_format.timestamp).strftime('%d %b %Y %H:%M') @timestamp.setter def timestamp(self, timestamp): diff --git a/tests/sapcar_test.py b/tests/sapcar_test.py index a360392..3838233 100755 --- a/tests/sapcar_test.py +++ b/tests/sapcar_test.py @@ -31,7 +31,7 @@ class PySAPCARTest(unittest.TestCase): test_filename = "test_string.txt" - test_timestamp = "01 Dec 2015 19:48" + test_timestamp = "01 Dec 2015 22:48" test_permissions = "-rw-rw-r--" test_string = "The quick brown fox jumps over the lazy dog"