On 22 February 2012 18:13, Jeremy Evans <[email protected]> wrote:
> On Feb 22, 8:34 am, Iain Barnett <[email protected]> wrote: > > Before the database is initialised: > > > > Sequel.default_timezone = :utc > > This may be the problem. If the database is storing times in > localtime, then you shouldn't set default_timezone = :utc. You > probably want database_timezone = :local and application_timezone > = :utc. This will convert the times from UTC->Local before they go > into the database, and Local->UTC upon retrieval from the database. > > I tried this and it didn't work, unfortunately. I only added those settings after noticing the problem, maybe it wouldn't be an issue if they'd been there from the off. Anyway, I went for "plan c" and have set the times by default in the app, and it brings back the results I expect. I'm very grateful for the help, as I'm sure it will be useful going forward. Regards, Iain -- You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en.
