datetime - Python: os.path.getmtime() for TZ agnostic timestamps originating from SD cards with different formats -


(note: may superuser question, since deals more how computer interprets timestamp... has implications programming deals timestamps originating external device.)

problem construction:

  1. format 3 sd cards in fat32, ntfs, , exfat
  2. create file on each of them using tz agnostic device (eg camera, or scientific instrument set time , date, no tz) @ precisely 12:00:00
  3. copy 3 files computer on california time (utc-7)
  4. run python: os.path.getmtime() on each. results vary.

it seems #3 critical step. here believe happens timestamps -- can confirm if correct?

  1. since fat32 records timestamps in localtime, computer assumes file created @ 12:00:00 california time (utc-7) , copies file timestamp of 19:00:00 (utc)
  2. since ntfs records timestamps in utc, computer assumes file created @ 12:00:00 utc, , copies file timestamp of 12:00:00 (utc)
  3. since exfat odd, stores in utc -- can include tz offset in master record -- assumptions go out window. does computer assume utc or utc-7 copies exfat timestamp without tz offset?

related:

how correct modified datetime of fat32 file, regardless of timezone in .net?


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -