localtime should accept any positive time value

Rein Klazes wijn at wanadoo.nl
Sat Feb 11 04:58:58 CST 2006


On Fri, 10 Feb 2006 22:10:29 -0600, you wrote:


>-  ULONGLONG time = *secs * (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970;
>+  /* time < 0 means a date before midnight of January 1, 1970 */
>+  if (*secs < 0) return NULL;

I think the comment is incorrect: it should be *secs < 0;

>-  if (st.wYear < 1970) return NULL;
>+  if (st.wYear < 1970)
>+  {
>+    /* if this happens it means that the sequence above does something wrong */
>+    FIXME("seconds since 1970 %ld => %d/%d/%d %02d:%02d:%02d\n", *secs,
>+           st.wDay, st.wMonth, st.wYear, st.wHour, st.wMinute, st.wSecond);
>+  }

If *secs < 3600, in time zones on the western hemisphere it is still
1969.

Rein.



More information about the wine-devel mailing list