though my first conclusion was wrong or the math I did was wrong, but
there was indeed an issue with the timezone. I pushed the changes onto
the git repository and setup a gem for (maybe someone else makes a
release soon):

http://mojo.saumya.de/do_jdbc-0.10.2-java.gem

please let me know if this fixes the timezone problem. but the result
will have the server timezone but the time as such is correct.

regards Kristian

On Jul 8, 10:48 pm, kristian <[email protected]> wrote:
> yes, I can verify this that a roundtrip gives a difference of 1 hour.
> and my timezone is +5:30. the database stores it with +0:00 but
> retrieves it +5:30 but the time is wrong by one hour. tested only
> jruby but I guess that is what you are using.
>
> regards Kristian
>
> On Jul 5, 4:01 pm, George <[email protected]> wrote:
>
> > After setting and saving a DateTime property, it is always returned
> > with +01 hour offset.
>
> > Is this by design? It makes comparison of datetime fields rather
> > tiresome.
> > (The +1 hour does match the timezone offset of the server but it is
> > not the time I asked datamapper to store!)
> > How should I handle datetimes better so I don't hit this problem?
>
> > Here's an example:
> >   trip.start_date = DateTime::civil( 2010, 5, 1, 13, 15, 0, 0 )
> >   trip.start_date.to_s.should == "2010-05-01T13:15:00+00:00" # PASS
> >   trip.save.should be_true # PASS
> >   trip.reload
> >   trip.start_date.to_s.should == "2010-05-01T13:15:00+00:00" # FAIL
>
> >   expected: "2010-05-01T13:15:00+00:00",
> >   got: "2010-05-01T13:15:00+01:00"
>
> > Incidentally the value that is stored in the database does exclude the
> > offset, so it seems to be added my DM when reading the data.

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en.

Reply via email to