Hello everyone, [This may be a Ruby question rather than a Heroku question; apologies in advance]
I have a model object which represents an English football match: >> match => #<Game id: 1184, created_at: "2008-11-28 08:01:01", updated_at: "2008-12-03 09:28:38", date: "2008-12-06", home_team: "Fulham", away_team: "Man City", home_goals: nil, away_goals: nil, home_win_probability: 0.37037, draw_probability: 0.29412, away_win_probability: 0.35714, league_id: 1, kickoff: nil> I want to set the kickoff time to 3pm GMT .. >> match.kickoff=Time.utc(2008, 12, 6, 15, 0, 0) => Sat Dec 06 15:00:00 UTC 2008 >> match.kickoff.gmtime => Sat Dec 06 15:00:00 UTC 2008 >> match.save => true So far, so good; now let's reload the match .. >> match=Game.find(match.id) => #<Game id: 1184, created_at: "2008-11-28 08:01:01", updated_at: "2008-12-03 09:44:25", date: "2008-12-06", home_team: "Fulham", away_team: "Man City", home_goals: nil, away_goals: nil, home_win_probability: 0.37037, draw_probability: 0.29412, away_win_probability: 0.35714, league_id: 1, kickoff: "2008-12-06 15:00:00"> .. and check the kickoff time .. >> match.kickoff.gmtime => Sat Dec 06 23:00:00 UTC 2008 !!! I'm assuming Heroku's servers are set at GMT - 8 hours, somewhere on the US East Coast; when I set the time to 3pm, it's saved in the database as 3pm local time, which then reloads as 11pm GMT [8 hours difference]. Can anyone shed some light on how to fix this ? Thanks in advance, Justin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Heroku" 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/heroku?hl=en -~----------~----~----~----~------~----~------~--~---
