posix-mktime bug/inconsistency

From: Albert L. Ting <alt_at_artisan.com>
Date: Mon, 17 Nov 1997 12:40:10 -0800 (PST)

SunOS does not have a mktime, so the posix library is using timegm.
However, timegm always assumes GM(UTC?) time whereas mktime assumes
localtime. From the stk point of view, this difference should not exist.

STk>(posix-localtime(posix-mktime(vector->posix-tm `#(0 0 10 1 0 97 3 0 #f))))
Solaris:
#<C-struct tm 00/01/97 10:00:00>
SunOS:
#<C-struct tm 00/01/97 02:00:00>

Big difference when providing an invalid UTC time (but valid localtime).
STk>(posix-localtime (posix-mktime (vector->posix-tm `#(0 0 2 1 0 97 3 0 #f))))
Solaris:
#<C-struct tm 00/01/97 02:00:00>
SunOS:
#<C-struct tm 11/31/96 18:00:00>

-- 
Albert L. M. Ting * alt_at_artisan.com * 408-548-3111(phone) * 408-734-5050(fax)
Artisan Components, Inc. * 1195 Bordeaux Drive * Sunnyvale * CA * 94089 * USA
Received on Mon Nov 17 1997 - 21:38:02 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST