Hi, El 12/10/10 14:55, Thomas Mueller escribió: >> DATE and TIME types have nothing to do with timezones. > Well, currently they do. See also ResultSet.getDate and getTime(..., > Calendar cal).
Rami say and I agree, that date and time fields stored in a database must be "static" values that should never be adjusted in regards of client's TZ. Only timestamps can be used for calendar conversions and arithmetic. >> TIMESTAMP refers to a point of time in the whole universe that can be shared >> by all possible calendar systems. > For certain use cases, yes. For other use cases, no. Let's say you > want to store a log file in the database. Of course you *could* > convert the timestamps to UTC. In this case you would get different > results depending on the timezone where you open the database file. > But in many cases people prefer to *not* convert the timestamp. If you > send a log file (that includes a timestamp column) to another country > then the timestamp in the log file doesn't magically change. You don't > *want* it to change. If it changes when you send the database file > then that's unexpected and therefore confusing. Maybe not for you, but > for others. > > That's probably why all databases I know don't convert timestamps when > you send the database file to another time zone. > > I'm not saying a new data type "TIMESTAMP WITH TIMEZONE" is not > needed. It would be a nice feature. But it's currently not > implemented. Thomas , again I understand that Rami say exactly the same thing. He argues that timestamps by default default should also be static, and if you need TZ conversions (and you don't have timestamp with TZ) you can add an extra field to store origin TZ of this timestamps or convert always to GMT, making timestamp with time zone data type a dispensable comfort feature. regards, Dario. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
