[Koha-bugs] [Bug 27463] OAI-PMH date handling in ListBase.pm

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 2 23:59:57 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27463

--- Comment #9 from David Cook <dcook at prosentient.com.au> ---
(In reply to Ere Maijala from comment #3)
> (In reply to David Cook from comment #1)
> > This could be an opportunity to fix the timezone handling too since I think
> > we're using local time rather than UTC time...
> 
> That shouldn't be the case. We set the timezone to UTF in Repository.pm.

Looking at this one again and I think our approach is still a bit flawed. 

"MySQL converts TIMESTAMP values from the current time zone to UTC for storage,
and back from UTC to the current time zone for retrieval. (This does not occur
for other types such as DATETIME.) By default, the current time zone for each
connection is the server's time. The time zone can be set on a per-connection
basis. As long as the time zone setting remains constant, you get back the same
value you store. If you store a TIMESTAMP value, and then change the time zone
and retrieve the value, the retrieved value is different from the value you
stored." (https://dev.mysql.com/doc/refman/5.6/en/datetime.html)

That works fine if your library system only uses 1 timezone, but it would be
problematic if you used multiple timezones. That said, if you were to use
multiple timezones, chances are they would be close together, and time
discrepancies in the OAI-PMH might pass relatively unnoticed. 

That's where storing the data as UTC in the first place is really crucial...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list