Skip Menu |

This queue is for tickets about the Kx CPAN distribution.

Report information
The Basics
Id: 31933
Status: resolved
Priority: 0/
Queue: Kx

People
Owner: Nobody in particular
Requestors: kilpatrick_ian [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.041



Subject: possible issue with dates
Date: Thu, 27 Dec 2007 10:24:11 +0000
To: <bug-kx [...] rt.cpan.org>
From: ian kilpatrick <kilpatrick_ian [...] hotmail.com>
I go to cspan to download Kx-0.03, put it in some directory, run perl Makefile.PL to generate makefilerun "make test" to test the interface. And the test complains make testPERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.tt/Kx....NOK 26# Failed test (t/Kx.t at line 113) # got: '2007421'# expected: '2007422't/Kx....NOK 50# Failed test (t/Kx.t at line 155) # got: '2007419'# expected: '2007420'# Failed test (t/Kx.t at line 163)# got: '2007429'# expected: '2007430't/Kx....ok 69/0# Looks like you failed 3 tests of 69. t/Kx....dubious Test returned status 3 (wstat 768, 0x300)DIED. FAILED tests 26, 50-51Failed 3/69 tests, 95.65% okayFailed Test Stat Wstat Total Fail Failed List of Failed The perl version is v5.8.5 on 64bit Linux. I think it might be because dates are convert to gmt seconds since the epoch but they are then converted to localtime in perl so 7pm on the previous day (for users in NY). You could maybe add a gmt offset in Z2epoch and take it off again in epoch2Z, then datetimes would be unaffected and dates will be midnight local time. thanks, ian Show quoted text
_________________________________________________________________ Who's friends with who and co-starred in what? http://www.searchgamesbox.com/celebrityseparation.shtml
The Kdb+ C interface ymd() function generates the epoch time. I think this can be fixed by changing localtime() to gmtime() in the test file. I've made a DEV release at https://metacpan.org/release/SLOYD/Kx-0.040_002 On Thu Dec 27 05:25:00 2007, kilpatrick_ian@hotmail.com wrote: Show quoted text
> > > I go to cspan to download Kx-0.03, put it in some directory, run perl > Makefile.PL to generate makefilerun "make test" to test the interface. > And the test complains > > make testPERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "- > e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.tt/Kx....NOK 26# > Failed test (t/Kx.t at line 113) # got: '2007421'# expected: > '2007422't/Kx....NOK 50# Failed test (t/Kx.t at line 155) # got: > '2007419'# expected: '2007420'# Failed test (t/Kx.t at line 163)# got: > '2007429'# expected: '2007430't/Kx....ok 69/0# Looks like you failed 3 > tests of 69. t/Kx....dubious Test returned status 3 (wstat 768, > 0x300)DIED. FAILED tests 26, 50-51Failed 3/69 tests, 95.65% okayFailed > Test Stat Wstat Total Fail Failed List of Failed > The perl version is v5.8.5 on 64bit Linux. > > I think it might be because dates are convert to gmt seconds since the > epoch but they are then converted to localtime in perl so 7pm on the > previous day (for users in NY). You could maybe add a gmt offset in > Z2epoch and take it off again in epoch2Z, then datetimes would be > unaffected and dates will be midnight local time. > > thanks, > ian > _________________________________________________________________ > Who's friends with who and co-starred in what? > http://www.searchgamesbox.com/celebrityseparation.shtml