Andrea Aime wrote:
> Hi,
> I'm doing some tests on postgis and I have some timezone issues.
> I live in Italy, some I'm +2 compared to Greenwich.
> 
> Now, with the following data in the db:
>           dt            |   timetest   |  datetest
> -------------------------+--------------+------------
>  2007-07-02 12:06:37.671 | 15:48:50.531 | 2007-07-04
> 
> and the xml rendering is:
> 
> <topp:dt>2007-07-02T12:06:37.671+02:00</topp:dt>
> <topp:timetest>15:48:50</topp:timetest>
> <topp:datetest>2007-07-03+00:00</topp:datetest>
> 
> dt and timetest are correct, datetest is... humm...
> well, suprising, but not fully incorrect.
> I mean, 2007-07-04 00:00 in timezone +2 is
> in fact 2007-07-03 22:00 in timezone +0...
> but this should not really happen.
>
Hmmm... well i assume that the value in the database is just a date 
which does not specify a timezone... so the question is when that date 
gets turned into an object in java what happens... because all dates 
store a timeszone internally. IT appears here that the local timezone is 
assumed and when the encoder encodes it ... converts it to GMT and you 
lose a day...

> Is there any reason why you forced GMT timezone for
> dates? I think 2007-07-04+02:00 or simply 2007-07-04
> would be both more correct.
I don't think this is something that is done explicitly... i think its 
just the behaviour of the encoder.

> Cheers
> Andrea
> 
> !DSPAM:4007,469f41ad221901439371379!
> 


-- 
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to