0.9.18.10: Win32 get_timezone robustness
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 26 Oct 2006 16:17:15 +0000 (16:17 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 26 Oct 2006 16:17:15 +0000 (16:17 +0000)
 * Windows localtime & gmtime functions don't like negative times.

NEWS
src/runtime/time.c
version.lisp-expr

diff --git a/NEWS b/NEWS
index 2b7fcc9..b1ccac8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ changes in sbcl-0.9.19 (1.0.0?) relative to sbcl-0.9.18:
        process.
     ** PROBE-FILE now simplifies pathnames correctly.
     ** DIRECTORY now works correctly with :WILD-INFERIORS.
+    ** (DECODE-UNIVERSAL-TIME 0) works.
 
 changes in sbcl-0.9.18 (1.0.beta?) relative to sbcl-0.9.17:
   * enhancement: SB-POSIX now supports cfsetispeed(3), cfsetospeed(3),
index 4b4cf9c..b4049c8 100644 (file)
@@ -27,7 +27,12 @@ void get_timezone(time_t when, int *secwest, boolean *dst)
     /* No _r versions on Windows, but the API documentation also
      * doesn't warn them about being non-reentrant... So here's
      * hoping they actually are -- once Windows grows threads
-     * this better be checked, though. */
+     * this better be checked, though. 
+     *
+     * The Windows versions also don't support times before the
+     * epoch, so we kludge it. */
+    if (when < 0) 
+       when = -when;
     ltm = *localtime(&when);
     gtm = *gmtime(&when);
 #else
index f65bd72..2e90dea 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.18.9"
+"0.9.18.10"