[Koha-bugs] [Bug 27573] Use of NOW() in SQL should be avoided

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 3 00:06:54 CET 2021


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

--- Comment #3 from David Cook <dcook at prosentient.com.au> ---
(In reply to Martin Renvoize from comment #2)
> In conversation with Jonathan I discovered we actually set the timezone on
> the database connection handle.. so this isn't the problem I suspected it
> was.

I should've mentioned that before. 

It would still be a problem though if you had 2 different Koha websites pointed
at the same database with different timezones, although I suppose these days we
use the koha-conf.xml rather than the Apache config to set the timezone, so I
suppose we are practically limiting Koha to only ever serving 1 timezone. 

Probably not an issue in most cases but certainly a shortcoming.

For instance, my state (New South Wales) actually contains 2 different
timezones. That means that Koha couldn't currently serve every school library
in this state with the correct time. 

A quick Google suggests France has 12 timezones, so Koha wouldn't be able to
handle all X libraries in France either. 

At some point, we really should consider converting from local time to UTC time
in the database. That is, transforming from local time to UTC when storing
data, and transforming from UTC to local time when retrieving data.

(This also helps to avoid daylight savings time issues.)

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


More information about the Koha-bugs mailing list