I have thought more about it. I now see that by "parsed using" you (seem to) mean very specifically that a value without an explicit time zone is parsed _as though_ the current time zone were inserted into the text of the value.
So, in my time zone (+11:00), the value TIMESTAMP '2000-01-01 12:00:00' would be parsed _as though_ it were the value TIMESTAMP '2000-01-01 12:00:00+11:00'. And that statement in the tutorial then says precisely nothing about what happens to values that _include_ time zones. (The date/time value is converted to the local time zone (which may be a no-op), then the time zone value is discarded.) But this does not seem to be what happens "under the hood". My reading of ValueTimestamp.parseTry() is that a value without a time zone does not have any time zone logic applied to it. Good. And this is important, because it means that if my application is running when daylight savings is about to begin or end, and I attempt to store a value TIMESTAMP '2000-01-01 12:00:00', it is _guaranteed_ that the value that is stored is '2000-01-01 12:00:00'. There is no race condition, for example, such that the value is _parsed_ in the time zone that is in place just before the change to daylight savings, then the change to daylight savings clicks over, and then later in the processing, the current timezone is checked, and the value is modified by one hour to match, and so the value that goes into the database is then either '2000-01-01 11:00:00' or '2000-01-01 13:00:00'. Bad stuff like that can't happen. If my revised understanding is right, then the tutorial statement "If the time zone is not set, the value is parsed using the current time zone setting of the system" is then more of a "convenient fiction" than a description of the implementation. -- 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 https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
