Does H2 handle TZ offsets as "+02:00"? Is the date in the db-files always in UTC, then? (Because else you will get plenty hours off when you move the database (and/or app server/application) from Oslo to New York.)
I actually do not think this is according to spec. If you stick in "2015-08-20T11:36", and live here i Norway, then move the server to California, it should still give you the same value "2015-08-20T11:36" when reading it back - hence it should not represent an point on the world timeline, but instead a local date-time. (Which I find close to absurd, and I do not understand when you would want that behaviour, but that is how the SQL standard is, AFAIK) Basically, a TIMESTAMP (DATETIME2 etc) is *local*, and basically represent "we eat lunch at 12 o'clock" (referring to the time-of-day), instead of "that slice of pizza was eaten exactly at 2015-08-20T11:36+02:00". I read some earlier comments on the list that H2 do actually handle TIMESTAMP like this (local) - according to spec. Anywhichway, if this actually is reality (that H2 handles offsets "+02:00" and the time is stored in UTC), *then my request narrows down to if it would be possible to alias this type to "**DATETIMEOFFSET", *so that we can use H2 more effective along with MS SQL Server - at least when putting H2 in SQL Server compatibility mode. Thanks, Endre On Wed, Aug 19, 2015 at 6:26 PM, Noel Grandin <[email protected]> wrote: > On 19 August 2015 at 17:03, Endre Stølsvik <[email protected]> wrote: > > get a different offset back - but the timestamp will nevertheless still > > represent the same instant on the world timeline - so it is "better than > > nothing". > > > We already do this with our existing TIMESTAMP datatype, in the sense > that it always reflects the same point on the world timeline > > -- > 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. > -- 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.
