[Pythonmac-SIG] stat(), alias files

Doug Wyatt doug@sonosphere.com
Wed, 28 Jul 1999 19:12:28 -0400


At 16:03 -0700 7/28/99, Joseph J. Strout wrote:
> At 6:23 PM -0400 07/28/99, Doug Wyatt wrote:
>
> >1. A file modification time returned by os.stat() is 4 years in the past
> >compared to a time constructed with time.mktime().  I suspect this is a
> >GUSI issue.
>
> No, this is a documented difference between MacOS times and Python
> standard times.  One is based on Jan 1, 1900, while the other is Jan
> 1, 1904.

This bugs me.  It seems that code that uses os.stat and the time module
ought to be portable and ignorant of the fact that MacOS times are
different from Python times.  I'd have thought that the times returned by
stat would be in Python times.  Oh well.


> See, you get a file's FInfo with GetFInfo().

Aha, I had done that before, long ago, and couldn't remember how.  Thanks.


Thanks for the reply!

Doug