
timezone inconsistency w/ do_mysql
Reported by Gary Yngve | February 14th, 2011 @ 06:43 PM | in 1.1
(note -- for attached script, you'll need to manually create a dm_test database, or rewrite the script to do so)
Using DO 0.10.3 and DM 1.0.2, if I save a record with a timestamp to Mysql, it gets written correctly inside the database, but when read back from the db, the timezone is one off.
I reproduced this on Mac, Ruby 1.8.7; Mac, Ruby 1.9.2; Ubuntu, Ruby 1.8.7
The 1.8 output is
~ (0.000837) INSERT INTO foos
(created_at
) VALUES ('2011-02-14 16:05:13')
<DateTime: 212164488313/86400,-1/3,2299161>
~ (0.000146) SELECT id
, created_at
FROM foos
ORDER BY id
LIMIT 1
<DateTime: 212164484713/86400,-7/24,2299161>
The 1.9 output is
~ (0.000890) INSERT INTO foos
(created_at
) VALUES ('2011-02-14 16:24:59')
<DateTime: 2011-02-14T16:24:59-08:00 (212164489499831587/86400000000,-1/3,2299161)>
~ (0.000187) SELECT id
, created_at
FROM foos
ORDER BY id
LIMIT 1
<DateTime: 2011-02-14T16:24:59-07:00 (212164485899/86400,-7/24,2299161)>
This error is not present with sqlite3.
Comments and changes to this ticket
-
Jordan Ritter February 14th, 2011 @ 08:34 PM
- State changed from new to resolved
- Milestone set to 1.1
- Assigned user set to Jordan Ritter
- Milestone order changed from 196339 to 0
Confirmed fixed per comments on https://github.com/datamapper/do/commit/9e369b79888abd4a3e7b4fd63ac....
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »