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

Validate timezones #260

Open
garrett opened this issue Jan 10, 2017 · 1 comment
Open

Validate timezones #260

garrett opened this issue Jan 10, 2017 · 1 comment

Comments

@garrett
Copy link
Contributor

garrett commented Jan 10, 2017

Talk datetimes (start and stop) are now parsed in the validate.rb script. However, incorrect timezones passed to Ruby's DateTime.parse are ignored.

This should be checked so that:

  1. The timezone actually does exist
  2. The daylight savings time matches the date

Obviously, we'd want to rely on existing Ruby library to check this. Hopefully standard Ruby can handle it. Otherwise, we might need to pull in an additional gem like chronic.

@duck-rh
Copy link
Contributor

duck-rh commented Jan 10, 2017

very good idea (after the recent build failure I saw on IRC).

Time and DateTime all fail to report invalid TZ, and the doc says it does not care about DST.
chronic is no more maintained (latest version in 2013); nevertheless it could have done the job, but it fails to report invalid TZ. Using strptime() with a %Z pattern does not work either. Rails extended classes do not seem to help much either. Honestly I wonder how to do that.

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

2 participants