Fix thread variable in timezone
What does this MR do and why?
Related to #48 (closed), the Time.zone
is a thread variable, we should change to config the instance variable Time.zone_default
.
Refer to:
- https://stackoverflow.com/questions/38327283/why-does-time-zone-get-set-to-nil-inside-thread
- https://github.com/rails/rails/blob/v7.0.2.4/activesupport/lib/active_support/core_ext/time/zones.rb#L15
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
由 Song Huang 编辑于