Hi, I have a strange case, my system clock is set to utc and eastern time (-5) rails is configured to use eastern time timestamps on the database work as expected, meaning they are stored in utc but by hand time entries are 2 hours behind, (why on earth two?) i.e Time.parse("2008-02-24 4 pm") will return Tue Feb 24 16:00:00 -0500 2009 but will store it in the database as 19:00 instead of 21:00 hrs (utc speaking) Any clues?
on 2009-02-24 18:02
on 2009-02-24 18:50
What happens if you do this: puts( Time.parse("2008-02-24 4 pm").utc ) Do you get the correct UTC time? - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
on 2009-03-23 03:54
On Feb 24, 10:49 am, Maurício Linhares <firstname.lastname@example.org> wrote: > What happens if you do this: > > puts( Time.parse("2008-02-24 4 pm").utc ) > > Do you get the correct UTC time? > Brigado Mauricio for the replay, yep, this was on scraped data, ashamed to say that I wasn't checking its integrity, when i got the data like this: yyyy-mm-ddhh_mm (without space between dd and hh), interestingly enough, after 2,200 parses the parser starts the 2 hour drift, (I am making sure that the date string comes properly formatted now) but still, an interesting 'feature'