Thank you for the swift reply, seems like we did at the same time, so just 
replying so that you have seen my initial addition.  Seems like issue is 
likely resolved. If you think further action on my part could help improve 
Sequel-rails let me know, otherwise thank you for what you do. 

On Sunday, 2 May 2021 at 13:49:23 UTC+9 Jeremy Evans wrote:

> 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/57a3a8bb-9ceb-48b1-a59e-ce54f654c548n%40googlegroups.com.

Reply via email to