From: Nikodemus Siivola Date: Thu, 26 Oct 2006 16:17:15 +0000 (+0000) Subject: 0.9.18.10: Win32 get_timezone robustness X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=5f711c8d7ed9e2a898e26291686ece3e4da6f9dc;p=sbcl.git 0.9.18.10: Win32 get_timezone robustness * Windows localtime & gmtime functions don't like negative times. --- diff --git a/NEWS b/NEWS index 2b7fcc9..b1ccac8 100644 --- 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), diff --git a/src/runtime/time.c b/src/runtime/time.c index 4b4cf9c..b4049c8 100644 --- a/src/runtime/time.c +++ b/src/runtime/time.c @@ -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 diff --git a/version.lisp-expr b/version.lisp-expr index f65bd72..2e90dea 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"