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

change DateTime to Time so config.time_zone used #18

Closed
wants to merge 1 commit into from

Conversation

psulightning
Copy link

DateTime was returning all classes in UTC. Changing to Time class allows for config.time_zone to set DateTimes from MindBody to proper locale.

@psulightning
Copy link
Author

Canceling this. It doesn't work.

@wingrunr21
Copy link
Owner

There's a few reasons why this wasn't going to work out:

  • Issue Add ability to specify Timezone(s) #4 details the timezone issues. The specific technical reason is that MindBody ships a timezone offset of 0 even when the timestamp itself is in another time zone. Ruby/Rails parses this verbatim and then applies whatever time zone offset it needs to
  • This gem is not Rails-specific. I am not loading ActiveSupport::TimeZone so config.time_zone doesn't do much outside of Rails
  • Sites are not all in 1 timezone so a universal timezone setting won't work

The solution to this is a custom Virtus datetime coercion module with configuration options. Or MindBody could just ship correct timestamps and avoid a lot of problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants