Skip to content

Make shift seeds timezone-aware. #298

Open
@timparenti

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions