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

GMTPlus* type error #16

Open
hanyuwei70 opened this issue Jan 23, 2018 · 1 comment
Open

GMTPlus* type error #16

hanyuwei70 opened this issue Jan 23, 2018 · 1 comment

Comments

@hanyuwei70
Copy link

When I use this code to process raw time string

match chrono::naive::NaiveDateTime::parse_from_str(&raw_timestring.trim(),&format{
    Err(e)=>(),                
    Ok(t)=>created_time=Some(GMTPlus1.from_local_datetime(&t).unwrap().with_timezone(&Utc))
}

I found that the GMTPlus1.from_local_datetime(&t).unwrap() is returning timezone -01.
So am I misunderstanding doc or there's something wrong with your code?

@jder
Copy link

jder commented Mar 14, 2021

For any future person baffled by this, the comment in the source data explains: https://github.com/eggert/tz/blob/ab21ad9710b88f28995b7ed47c6efda47ffb1be5/etcetera#L37-L43

In other words, it sounds like they're all flipped in sign from what you'd expect for POSIX compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants