Discussion opened here, with a few suggestions: https://github.com/janko/sequel-activerecord_connection/issues/1
Let me know what you think is the best solution. 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/e7ee5ec8-6d25-48f3-bcb6-c579fa79c6e0%40googlegroups.com.
