https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37952
--- Comment #5 from David Cook <[email protected]> --- (In reply to Nick Clemens (kidclamp) from comment #1) > Currently we store them in server time and present the conf time on display, > is that correct? I don't think that's how it works. If I recall correctly, the time zone configuration is used to set the time zone used in the database connection (see Koha/Database.pm) and in Perl DateTime objects. So if you've set Australia/Sydney in your koha-conf.xml, we create Perl DateTime objects according to the Australia/Sydney time zone, and then those basically get stored as strings in the MySQL database. When we retrieve those strings, we assume they're in Australia/Sydney and go from there. I think a sort of exception is the TIMESTAMP data type. When you're storing a TIMESTAMP, it converts from the connection's TZ into UTC for storage under the hood. If you were to connect with a different TZ, then you'd get that TIMESTAMP automagically in your connection's TZ. I don't 100% understand the ins and outs of MySQL datetime, as I do a lot more in this area with PostgreSQL. > This will impact reports from the end user - would it be worth having > support in reports for datettime pickers that will convert entered > date/times to UTC if we do this? This will certainly be a consideration we have to keep in mind. Also, any SQL query that uses LIKE, because the end user is going to think they're sending a partial date using their local timezone, but as I note on bug 37902 we'll be processing it using server time. At the moment, server time probably works most of the time, but if/when we switch to UTC for DATE and DATETIME, we'll run into trouble where users will get unexpected results. -- I need to do more thinking on this, review MySQL docs more, and I need to review Joubu's patches. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
