[Koha-bugs] [Bug 12669] "Template process failed: undef error - Invalid local time for date in time zone"

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 5 04:44:11 CEST 2016


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

--- Comment #35 from David Cook <dcook at prosentient.com.au> ---
(In reply to Colin Campbell from comment #33)
> I wonder if we could use utc internally and just use the local timezone to
> convert user input and to present the date externally. We'd need to be
> fairly vigorous in cleaning up the various vaguely different ways we
> currently treat dates, cetainly when we're doing calculations we probably
> want to do them in a common base as otherwise there's too many opportunities
> to fall into a given timezone's black hole

Agreed. I think we could use UTC internally and just use the local timezone to
convert user input and convert output for users.

We would need to be vigorous in cleaning up how we've currently treating dates
though, yeah :/. Generally speaking, we're not recording super precise datetime
data, so I don't see why we couldn't use floating timezones for calculations. I
suppose it depends on the calculations being done, but that's really the only
way of doing it with our current holiday checking code without causing invalid
local times. 

We might be able to use UTC for some calculations, but... I don't think so  in
the holiday case because we'd be interested in local days and obviously UTC
doesn't always correspond with the same day. You might have 2 UTC timestamps
for the same day in UTC, but they'd actually correspond to different days in
local time. If you truncated that for the sake of date checking, you'd be
skipping one of the local days, which would be really bad.

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


More information about the Koha-bugs mailing list