-
Notifications
You must be signed in to change notification settings - Fork 119
Closed
Description
Please complete the following fields as applicable:
What version of the DMPRoadmap code are you running? (e.g. v2.2.0)
https://github.com/DMPRoadmap/roadmap/tree/v3.0.1
Expected behaviour:
This spec https://github.com/DMPRoadmap/roadmap/blob/v3.0.1/spec/services/api/v1/deserialization_service_spec.rb
should succeed, no matter the time zone it runs in.
Actual behaviour:
If you run this spec in time zone that is higher than UTC (e.g. Brussels),
then some these tests fail:
Steps to reproduce:
- Run this from a different timezone higher than UTC
What happens in safe_date:
- The variable
expectedwith value2020-11-11is parsed bysafe_dateas a local time into an appropriate Time object with time zone support:2020-11-11T00:00:00+01:00 - That result is then converted to UTC:
2020-11-10T23:00:00Z - the spec expects the string to start with
2020-11-11, which fails in this timezone
What should happen:
- compare
expectedto[Time object].localtime.to_sinstead of to the stringified version of UTC.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels