On Sat, May 1, 2021 at 8:37 PM [email protected] <[email protected]>
wrote:

> Hi, So i am currently trying to implement devise inside a rails project
> running on sequel-rails, and i have run into an issue with the setting of
> the DateTime object.
>
> I currently have an issue open in the Devise github for reference
> https://github.com/heartcombo/devise/issues/5377
>
> To describe the issue here devise sets the time for reset_password sent at
> in the line :
>
> self.reset_password_sent_at = Time.now.utc
>
> The model then returns the time with UTC + 9 (my timezone) rather than UTC
> and this then leads to an error when validating whether the
> reset_password_token is still valid.
>
> I am reluctant to say what should be done here, it does seem that devise
> is trying to pass the time zone and sequel is failing to store it, but
> there may be some deeper convention i am missing.
>
> Any ideas on where to go with this? it could even be a sequel-rails issue,
> or maybe something i have failed to implement on my end.
>
> (i just updated sequel-rails to make sure it wasnt an old error, so just
> tested with sequel-rails v 1.1.1 and sequel v 5.44.0 and no change)
>

If you think this is a bug in Sequel, please create a minimal self
contained example that does not depend on anything other than Sequel itself.

Not all databases Sequel supports support timezones in timestamps.  Some
that do support timezones in timestamps just convert the value to UTC and
don't actually store the input timezone.  Sequel supports both database and
application timezones (see Sequel.application_timezone and
Sequel::Database#timezone), so that it can convert from one to the other
when insert/updating records and when retrieving records.

Thanks,
Jeremy

-- 
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/CADGZSSdZNN2Eob618ysG%2Bo6%2BisT6nFFk%2B5H6mjeOZs-PQnZ-ug%40mail.gmail.com.

Reply via email to