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

Problems with 12am/12pm #2

Closed
kytta opened this issue Dec 4, 2021 · 0 comments · Fixed by #4
Closed

Problems with 12am/12pm #2

kytta opened this issue Dec 4, 2021 · 0 comments · Fixed by #4

Comments

@kytta
Copy link

kytta commented Dec 4, 2021

Times such as "12am" or "12pm" don't seem to work correctly now. For example, I want to compare times in Montreal and Berlin.

Behaviour for any time other than 12am/pm — works normally:

$ when "5pm in montreal -> berlin"
time: 17:00:00
date: 2021-12-04
location: Montreal (Canada)
zone: America/Toronto (-0500)

time: 23:00:00
date: 2021-12-04
location: Berlin (Germany)
zone: Europe/Berlin (+0100)

Behaviour for "12pm" — program panics:

$ when "12pm in montreal -> berlin"
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/parser.rs:68:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Behaviour for "12am" — program treats it as 12:00 (which AFAIK is 12pm):

$ when "12am in montreal -> berlin"
time: 12:00:00
date: 2021-12-04
location: Montreal (Canada)
zone: America/Toronto (-0500)

time: 18:00:00
date: 2021-12-04
location: Berlin (Germany)
zone: Europe/Berlin (+0100)
badboy added a commit to badboy/when that referenced this issue Dec 4, 2021
mitsuhiko pushed a commit that referenced this issue Dec 5, 2021
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 a pull request may close this issue.

1 participant