Skip to content
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

Make shift seeds timezone-aware. #298

Open
timparenti opened this issue Apr 2, 2019 · 1 comment
Open

Make shift seeds timezone-aware. #298

timparenti opened this issue Apr 2, 2019 · 1 comment
Assignees

Comments

@timparenti
Copy link
Contributor

After upgrading to Rails 5+, db/seeds.rb should probably use something like Time.zone.strptime() instead of DateTime.strptime() in order to create timestamps which are properly timezone-aware. This should fix the recurring bug over the last few years which has caused the initially-seeded shifts to end up scheduled 4 hours earlier than desired, since DateTime.strptime() ends up interpreting the local timestamps defined in the CSVs as UTC instead.

Also, grep the repo for all instances of Eastern and New_York to find other similar cases.

@timparenti timparenti self-assigned this Apr 2, 2019
@timparenti
Copy link
Contributor Author

Leaving more breadcrumbs for later:

Once merged, this would also affect "Carnival creation"-style shift seeding in d091159 as well as task seeding in 4b8a0c5 (both from #294).

The only timestamps seeded into the database in this way are shift start, shift end, and task due.

timparenti added a commit that referenced this issue Apr 6, 2019
For consistency with the late shift report and others.  Will later tie into
other timezone work related to #298.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant