-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rake rails db:seed fails when system TZ
and TIME_ZONE
do not match
#344
Labels
Comments
Hi Trombik, Thanks for your report. I think we simply should not use DateTime here since birthday is a date. Issue will be fix in the next release. Have a nice day |
thanks for the answer. looking forward to the next release. p.s. i have been impressed with the product. |
trombik
added a commit
to trombik/fab-manager
that referenced
this issue
May 6, 2022
sylvainbx
pushed a commit
that referenced
this issue
May 11, 2022
… use Date.current instead of DateTime.current since birthday is a date (see #344)
trombik
added a commit
to trombik/fab-manager
that referenced
this issue
May 13, 2022
Fixed in Fab-manager v5.4.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
rake rails db:seed
fails when the system timezone is UTC, andTIME_ZONE
is+09
(or any+N
). this error is caused byDateTime.current
, which can be future date inUTC
.fab-manager/db/seeds.rb
Lines 87 to 95 in e1256ec
a possible fix is shown below.
To Reproduce
Steps to reproduce the behavior:
TZ
to UTCTIME_ZONE
in.env
to+N
country, such asAsia/Tokyo
bundle exec rails db:seed
in early morning or after midnightExpected behavior
bundle exec rails db:seed
succeeds.Screenshots
N/A
Server:
FreeBSD default-freebsd-130-amd64.vagrantup.com 13.0-RELEASE-p8 FreeBSD 13.0-RELEASE-p8 #0: Tue Mar 15 09:36:28 UTC 2022 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
v5.3.13
ateb6ce88db171a67de9e0c0e28401828ae9274b0d
Browser:
99.0_1
Additional context
another possible fix is to set either the system timezone or
TIME_ZONE
to an identical timezone. however, there are cases where system timezone in UTC is preferred, say, when you have machines in multiple time zones. also,TZ
cannot be changed by users who do not have system-level privileges.The text was updated successfully, but these errors were encountered: