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

Specifying time zone in start/stop as well as location should be disabled #26

Open
jleben opened this issue Mar 27, 2018 · 0 comments
Open

Comments

@jleben
Copy link
Contributor

jleben commented Mar 27, 2018

There are problems when one specifies start and stop with a time zone (e.g. 15:00 -0700) but also provides a location.

Specifically, it is neither well specified nor obvious what the behavior should be when the location is inconsistent with the time zone.

Even when the location is consistent with the time zone (e.g. America/Vancouver during PDT, which is -0700), the interpretation of start and stop is wrong. This is because func (*TimeOfDay) UnmarshalJSON for some reason converts start and stop to UTC before extracting hour and minute. This can easily be verified by running check with the following input at 00:30 -0700, which produces no new version:

{
  "source": {
    "start": "00:00 -0700",
    "stop": "01:00 -0700",
    "location": "America/Vancouver"
  }
}

Due to all of the above, I think check should simply abort with error in such case.

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

No branches or pull requests

1 participant