[WDM] Assume Europe/London for update fetching time params.#518
Conversation
dracos
left a comment
There was a problem hiding this comment.
I'm afraid this doesn't do anything, because time_zone is used for parsing with Strptime, not formatting:
$ bin/cron-wrapper perl -MIntegrations::WDM -e'
my $e = Integrations::WDM->new;
print $e->format_datetime( $e->parse_w3c_datetime("2026-06-12T12:00:00Z") );'
2026-06-12 12:00:00
Probably easiest if parse_w3c_datetime is changed to always change the timezone of what it's worked out (which could be a UTC timestamp or a local one already):
my $dt = $w3c->parse_datetime($dt_string);
$dt->set_time_zone('Europe/London');
That then gives:
$ bin/cron-wrapper perl -MIntegrations::WDM -e'
my $e = Integrations::WDM->new;
print $e->format_datetime( $e->parse_w3c_datetime("2026-06-12T12:00:00Z") );'
2026-06-12 13:00:00
3db0121 to
cac95b9
Compare
Sorry, not my brightest moment. Thanks for laying it out clearly. I think this change will also affect the timestamps we send out for |
This also affects the timestamps sent in 'post_update' and 'raise_defect'.
cac95b9 to
ee85398
Compare
dracos
left a comment
There was a problem hiding this comment.
Thanks; updated_datetime comes through from FMS with a local timezone (in perllib/Open311.pm) (so +01:00 at the moment), so I assume will be unchanged by setting the timezone to the same thing.
Relates to https://mysocietysupport.freshdesk.com/a/tickets/7054.