os.stat() mtime "Epoch" mixup

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
ttmetro
Posts: 104
Joined: Mon Jul 31, 2017 12:44 am

os.stat() mtime "Epoch" mixup

Post by ttmetro » Mon Nov 13, 2017 6:13 pm

Apparently micropython os.stat times are relative to Jan 1, 2000 rather than Jan 1, 1970.

Where can I find this documented? The micropython 1.9.3 doc for os.stat just states
uos.stat(path)
Get the status of a file or directory.
The reason I care is that apparently the firmware I am using - loboris' python - uses 1970 as the base year and then rshell/rsync does not work properly. Presumably the firmware should be changed, following which documentation?

Bernhard
Bernhard Boser

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: os.stat() mtime "Epoch" mixup

Post by pythoncoder » Tue Nov 14, 2017 6:13 am

Peter Hinch
Index to my micropython libraries.

ttmetro
Posts: 104
Joined: Mon Jul 31, 2017 12:44 am

Re: os.stat() mtime "Epoch" mixup

Post by ttmetro » Tue Nov 14, 2017 7:31 am

Thanks. I raised an issue with loboris' MicroPython.

Bernhard
Bernhard Boser

Post Reply