2014-05-06 18:11 GMT+02:00 Thomas Mueller <[email protected]>:

> Hi,
>
> H2 did store timestamps as UTC. Search for "timezone" in this group to see
> what problems this caused.
>

I'm assuming you're talking about this thread:
https://groups.google.com/d/msg/h2-database/O5mfM1iSSow/7QMDoGXndCIJ


> With H2 version 1.4, this is no longer the case, and I believe this solves
> many issues. For example:
>
> Let's assume somebody in Elbonia (doesn't exist, I know) today stores a
> timestamp in the future, 2020-05-03 10:00:00, in H2. H2 would then convert
> that to UTC, let's say that's 2020-05-03 06:30:00. When storing that value,
> the rules are that this is during the daylight saving time of Elbonia. One
> year later, the Elbonia government decides to not use daylight saving time
> any longer, and they change the timezone by 30 minutes. Now, a user of H2
> opens the database. Because of the changed rules, the conversion is no
> longer the same, and the displayed value is 2020-05-03 11:30:00, not any
> longer 10:00:00. I think that's weird. I would call it a bug.
>

Humm... I trade you your use-case against mine:

That person in Elbonia calculated 2020-05-03 10:00:00 to be *exactly* (SQL
standard syntax):

    CURRENT_TIMESTAMP() + '6-0' YEAR TO MONTH.

So, TIMESTAMP + INTERVAL. Now, because of the above clever workaround, you
go and (possibly) change their actual value towards what *would have been*:

    CURRENT_TIMESTAMP() + '6-0' YEAR TO MONTH + '0 01:30:00' DAY TO SECOND

I can see your point, but I think the fix might have introduced quite a
regression for some people who rely on TIMESTAMP being the equivalent of a
unix timestamp, not a date-time literal - although, both representations
have their eligibility.

Now, I haven't thought this through to the end, but I still feel that we're
moving into danger-zone with this change... What is your opinion regarding
my example?

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to