You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run this from a different timezone higher than UTC
What happens in safe_date:
The variable expected with value 2020-11-11 is parsed by safe_date as 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 expected to [Time object].localtime.to_s instead of to the stringified version of UTC.
The text was updated successfully, but these errors were encountered:
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:
https://github.com/DMPRoadmap/roadmap/blob/v3.0.1/spec/services/api/v1/deserialization_service_spec.rb#L188
Steps to reproduce:
What happens in
safe_date
:expected
with value2020-11-11
is parsed bysafe_date
as a local time into an appropriate Time object with time zone support:2020-11-11T00:00:00+01:00
2020-11-10T23:00:00Z
2020-11-11
, which fails in this timezoneWhat should happen:
expected
to[Time object].localtime.to_s
instead of to the stringified version of UTC.The text was updated successfully, but these errors were encountered: