Skip Menu |

This queue is for tickets about the Time-Zone-Olson CPAN distribution.

Report information
The Basics
Id: 118694
Status: resolved
Priority: 0/
Queue: Time-Zone-Olson

People
Owner: Nobody in particular
Requestors: andreas.guldstrand [...] gmail.com
Cc:
AdminCc:

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



Subject: Using date(1) in tests
Date: Thu, 10 Nov 2016 13:08:29 +0100
To: bug-Time-Zone-Olson [...] rt.cpan.org
From: Andreas Guldstrand <andreas.guldstrand [...] gmail.com>
Using date(1) in the tests will not work on for example Windows, even if they've got themselves a /usr/share/zoneinfo database. I'm unsure about a way to to run the same tests without it though. Perhaps skip them if the date program doesn't give reasonable output when you do "date --version"?
On Thu Nov 10 23:08:38 2016, andreas.guldstrand@gmail.com wrote: Show quoted text
> Using date(1) in the tests will not work on for example Windows, even > if they've got themselves a /usr/share/zoneinfo database. > > I'm unsure about a way to to run the same tests without it though. > Perhaps skip them if the date program doesn't give reasonable output > when you do "date --version"?
Yeah, I usually make an effort to code for the Win32 platform. This module has been an exception so far. There is probably a WMI interface i could interogate to test timezone information on Win32.
On Fri Nov 11 19:46:38 2016, DDICK wrote: Show quoted text
> There is probably a WMI interface i could interogate to test timezone > information on Win32.
I wound up using the Win32 API call SystemTimeToTzSpecificLocalTime