----- Original Message ----- From: "Robert G. Jakabosky (via RT)" <[EMAIL PROTECTED]> Subject: [perl #57504] [PATCH][Lua] Fixed 64bit bug in Lua bytecode decoder/translator.

Changes to 'languages/lua/t/os.t':
1 test from 'os.t' fails on 64bit systems because 'os.time()' does not return a 'nil' for dates with year < 1970. 'os.time()' only returns 'nil' when mktime returns ((time_t)-1). On 32bit systems mktime uses -1 for dates outside year range 1970-2038. On 64bit systems mktime returns negative values for dates before year 1970, so there is only one date that will cause mktime to return -1 and make 'os.time()' in lua return 'nil'. I have updated
the test to use that one date that returns 'nil' on both 32bit & 64bit
systems.

Unfortunately this solution only works in a specific time zone. I have committed (rev 29938) an alteration to this patch, which calculates the date/time corresponding to -1.
This should now be self-adjusting for various time zones.

Regards
Peter Gibbs

Reply via email to