Re: [h2] DATE / TIME types are not consistent across timezones / DST!

2017-07-26 Thread Thomas Mueller Graf
Hi,

I think you should write a simple, self contained, reproducible test case.

Regards,
Thomas


On Monday, July 24, 2017, marcolopes  wrote:

> I believe H2 works differently from MySQL and PostgreSQL :
> LocalTime is not SAVED, so, i have a big problem in my hands :
>
> I opened a new topic: https://groups.google.com/forum/#!topic/h2-database/
> BYlk8oVfLd8
>
> On Monday, July 24, 2017 at 12:54:16 PM UTC+1, marcolopes wrote:
>>
>> The problem is if the same database is opened in a different TIMEZONE,
>> all the DATE and TIME will be changed!!!
>>
>> I cannot control if the fields were saved under ONE or another timezone!!
>> It is up to the database engine to do that...
>>
>> TIME 00:00 saved under one timezone should be retrieved as 00:00 under
>> another timezone! This is critical!
>>
>> On Monday, July 24, 2017 at 12:51:12 PM UTC+1, Noel Grandin wrote:
>>>
>>>
>>> How the data is presented is up to you, we just make sure the same data
>>> is stored and retrieved.
>>>
>>> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] DATE / TIME types are not consistent across timezones / DST!

2017-07-24 Thread marcolopes
The problem is if the same database is opened in a different TIMEZONE, all 
the DATE and TIME will be changed!!!

I cannot control if the fields were saved under ONE or another timezone!! 
It is up to the database engine to do that...

TIME 00:00 saved under one timezone should be retrieved as 00:00 under 
another timezone! This is critical!

On Monday, July 24, 2017 at 12:51:12 PM UTC+1, Noel Grandin wrote:
>
>
> How the data is presented is up to you, we just make sure the same data is 
> stored and retrieved. 
>
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] DATE / TIME types are not consistent across timezones / DST!

2017-07-24 Thread Noel Grandin


How the data is presented is up to you, we just make sure the same data is 
stored and retrieved.

--
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] DATE / TIME types are not consistent across timezones / DST!

2017-07-24 Thread marcolopes
I explained myself wrong...

The DATE and TIME must be presented the same way if the database is 
accessed in another timezone! So, original timezone must be taken into 
account...

On Sunday, July 23, 2017 at 6:52:58 AM UTC+1, Noel Grandin wrote:
>
> our DATE/TIME fields very specifically do not change across time zones.
>
> But if other layers are converting backwards and forwards through types 
> like Timestamp, it is quite possible that they may influence the results.
> ​
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] DATE / TIME types are not consistent across timezones / DST!

2017-07-22 Thread Noel Grandin
our DATE/TIME fields very specifically do not change across time zones.

But if other layers are converting backwards and forwards through types
like Timestamp, it is quite possible that they may influence the results.
​

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] DATE / TIME types are not consistent across timezones / DST!

2017-07-22 Thread marcolopes
I've been using H2 for years (stayed on version h2-1.3.169 because of 
inconsistent behavior of the next 1.3.x versions)

Recently i've found a behavior that needed days of debug and is affecting 
VERY SENSIBLE information: *the DATE / TIME types behavior across timezones 
/ DST*?

I need a clarification, because i don't know what to do!

I have several cryptographic methods that are based on DATE and TIME 
fields, and they expect these fields to return the EXACT same value that 
was stored.

I give you and example: an INVOICE is stored in the database, with *DATE 
and TIME values that CANNOT change across timezones / DST...* Currently, 
this sensitive data is being adjusted accordingly the TIMEZONE / DST!!! 
This cannot happen!!!

I really need help understanding this situation.. *this does not occur with 
PostgreSQL or MySQL DATE and TIME types...*

How can i READ the DATE / TIME fields without timezone manipulation? This 
is very very important, because a document cannot be edited and worst, 
PRINTED! with different values!

Thanks a lot!

P.S. I'm using DataNucleus as a persistence layer.

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.