> This issue is limited to SQLite, correct? Definitely happening with sqlite, although I haven't tested with other databases.
> It's possible we could modify the sqlite support in Sequel to make the timezone passed to the datetime function configurable. I'll see about doing that in the next release. That would be great, but this might something more important when using the sequel activerecord connection plugin, as the plugin has to be aware of the differences in timezone handling between both orms. I'll also open an issue there. segunda-feira, 18 de Maio de 2020 às 19:22:32 UTC+1, Tiago Cardoso escreveu: > > I'm having a small integration issue with rodauth-rails, sequel and the > sequel-activerecord-connnection gem, when performing date operations. > > My issue is a particular query where I do: > > .where(Sequel[oauth_grants_expires_in_column] >= Sequel::CURRENT_TIMESTAMP) > > > The main problem is that, when using plain sequel, datetimes are stored in > localtime, while in rails, they're converted to utc and stored. In itself, > this shouldn't be a problem, however, the resulting query from the abovet > subset is: > > AND (`expires_in` >= datetime(CURRENT_TIMESTAMP, 'localtime'))) > > this evaluates well when datetime rows are stored in localtime, but not > when the row is utc, i.e. it seems that CURRENT_TIMESTAMP could benefit > from knowing the timezone in which a datetime is stored, however I'm not > sure how difficult that would be. > > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/c478d13f-b9ce-4789-8ddc-bf85a488b0d0%40googlegroups.com.
