Hi,
I just checked: ctime and asctime have a different behaviour when it comes to parameter checks, although they work on the same buffer. I'll address this soon. Most param checks are missing indeed, but they'll be added one after another. I'm just starting on that. The only real life problem with the code that I could find is that mktime produces a time that is one or two hours off.
Best regards
Gregor Schneider
I still haven't understood: why years before 1970 are wrong?
2009/8/5 Gregor Schneider grschneider@gmail.com:
Hi,
I just checked: ctime and asctime have a different behaviour when it comes to parameter checks, although they work on the same buffer. I'll address this soon. Most param checks are missing indeed, but they'll be added one after another. I'm just starting on that. The only real life problem with the code that I could find is that mktime produces a time that is one or two hours off.
Best regards
Gregor Schneider
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Alexander Potashev wrote:
I still haven't understood: why years before 1970 are wrong?
For POSIX compatibility, the time function of the Microsoft C runtime returns an UNIX timestamp
ctime and asctime handle this differently: -asctime allows years from 1900, since it offsets the years. Values given supplied that (negative) let the function output garbage. Ref: http://www.cplusplus.com/reference/clibrary/ctime/tm/ -ctime gets the number of seconds passed and converts these to a struct which is passed to asctime in this implementation. The first second is defined to be on 1st jan 1970. Ref: http://www.cplusplus.com/reference/clibrary/ctime/time_t/
Anyway I'll most likely test tkreuzer's crt time implementation from the 64bit branch. If if works out good it'll replace the current crt time code soon.
Best regards G. Schneider