py4n6 / pytsk

Python bindings for The Sleuth Kit (libtsk)
Apache License 2.0
92 stars 24 forks source link

pytsk/libtsk: different FAT-12 access time between Linux and Windows build #75

Closed joachimmetz closed 3 years ago

joachimmetz commented 3 years ago

Seen in dfVFS tests https://ci.appveyor.com/project/log2timeline/dfvfs/builds/38756537/job/wm02y4l1rayubq2y

pytsk/libtsk returns a different FAT-12 access time for Linux and Windows build

joachimmetz commented 3 years ago

This appears TZ releated

TZ=UTC PYTHONPATH=. python3 tests/vfs/tsk_file_entry.py
............................F........................................
======================================================================
FAIL: testGetStat (__main__.TSKFileEntryTestFAT12)
Tests the GetStat function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/vfs/tsk_file_entry.py", line 675, in testGetStat
    self.assertEqual(stat_object.atime, 1618696800)
AssertionError: 1618704000 != 1618696800

----------------------------------------------------------------------
Ran 69 tests in 0.964s

FAILED (failures=1)
joachimmetz commented 3 years ago

Added work-around to have pytsk set TZ to UTC