[hatari-devel] Gemdos date/time confusion/problems (fixed)

Eero Tamminen eerot at users.berlios.de
Tue Dec 8 22:31:28 CET 2009


Hi,

On Tuesday 08 December 2009, Jerome Vernet wrote:
> > Btw. Hopefully this works also on OSX and Windows, I'm not sure how
> > portable utime() function is.  Man page says "SVr4, POSIX.1-2001" for
> > it and "4.3BSD, POSIX.1-2001" for utimes() (OSX is BSDish), but states
> > that "POSIX.1-2001 marks utimes() legacy" so I used utime().
>
> I still have a date/time problem under OSX, since your last changes.
> Under PureC, files date are wrong, by one month. If I save a file today
> (12/08/2009), the date reported, both under MacOsX and TOS is set to
> 01/08/2010.

Thanks for checking.  I had forgot to decrement the TOS month (1-12)
for Unix time_t tm_mon (0-11).  I guess it overflowed to year value.

I've commited a one-liner fix, could you test whether things work better
now?


	- Eero



More information about the hatari-devel mailing list