python - Do filesystems store time zone information? -


do filesystems store time zone information along file information? ran weird bug following snippet , different time zone printed out.

import datetime #zope's module each in os.listdir("director"):     print datetime.datetime(os.stat(each)[8])  #why mixed up? foo 12:00:00 us/eastern bar 12:00:00 gmt -4 

it started happen after daylight saving changes made. see eastern , gmt -4 both. iirc linux doesn't store time stamp information, instead stores time absolute seconds elapsed jan 1st 1970.

is possible file systems store time zone information? informed dst (daylight saving time) expressed using different timezones. in day light saving scenario or in general - these meta data's stored file-system?

for eg: https://rsync.samba.org/daylight-savings.htm points out fat stores daylight saving information.

since per accepted answer both same time zones, possible show gmt -4 eastern daylight savings time make things clear end user?

i'm not aware of file system store timezone information timestamps. depending on file system / operating system it's either stored in utc, or in local time.

zope's datetime use local timezone unless specify else.

us/estern gmt -4 during daylight savings, correct.


Comments