| Summary: | Running t/db_dependent/api/v1/patrons.t in another timezone fails | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
| Component: | Test Suite | Assignee: | Chris Cormack <chris> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | tomascohen |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
A few cases with datetime values do implicitly assume UTC. So we could add that to the test. Not sure if we should.
Also note for instance:
my $last_seen_rfc3339 = $last_seen . "z";
Hardcoded timezone ;)
If you have no timezone in koha-conf and you export TZ=Etc/UTC before running the test, they will pass.
Otherwise you need this at the start:
local $ENV;
$ENV{TZ} = 'Etc/UTC';
t::lib::Mocks::mock_config( 'timezone', 'Etc/UTC' );
|
TZ was Europe/Amsterdam t/db_dependent/api/v1/patrons.t # Failed test 'Filtering by date-time works' # at t/db_dependent/api/v1/patrons.t line 247. # got: undef # expected: '5752' # Failed test 'Filtering by date-time works' # at t/db_dependent/api/v1/patrons.t line 270. # got: undef # expected: '5752' # Looks like you failed 2 tests of 12. There are also date filters, but they work. The date time filtering here does not work (two hours difference now)? Couldnt find what happens here rightaway.