py4n6 / pytsk

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

PYTSK_SKIP_TZSET - Environment variable to skip default setting of timezone #99

Closed greateggsgreg closed 6 months ago

greateggsgreg commented 6 months ago

Programs may rely on a consistent, non-UTC timezone, for logging / other behaviors. When pytsk3 is imported, this code will may change the timezone in the middle of a program run which has adverse effects. I do understand this is to correct libtsk behavior, however, this is a way to opt-out of the forced tzset and handle libtsk's timestamp behavior separately.

joachimmetz commented 6 months ago

Can you elaborate why do you want to do this? this leads to non-deterministic behavior also see https://github.com/py4n6/pytsk/issues/75

joachimmetz commented 6 months ago

Creating a work-around for a work-around is not a good idea, closing in favor of patching the sleuthkit source https://github.com/py4n6/pytsk/pull/102

greateggsgreg commented 6 months ago

Ah thank you that'll work as well @joachimmetz