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
I'm using chrono in WASM. My local timezone is UTC+2, but I get the same string twice when running this code:
let date : chrono::DateTime<Utc> = ...;println!("{}", date);println!("{}", date.with_timezone(&chrono::Local));
It seems that the local timezone is wrong when running in WASM. I tried both on Chrome and Firefox. I'm on Linux if it's relevant. I'm using chrono 0.4.19.
The text was updated successfully, but these errors were encountered:
That was indeed the issue. Should there be a compilation warning, or a panic when using the Local timezone without this feature? Rather than doing the wrong thing silently.
Just ran into this same issue, and I can confirm that the behaviour is rectified with the use of the wasmbind feature, with an essentially identical set up to OP.
It's slightly peculiar, because I'm sure it was showing the correct offset a few days/couple of weeks ago...
Anyway, I agree that some sort of warning would be better than silently producing the wrong behaviour. I'm not sure how this could be programatically detected, though.
Hello,
I'm using chrono in WASM. My local timezone is UTC+2, but I get the same string twice when running this code:
It seems that the local timezone is wrong when running in WASM. I tried both on Chrome and Firefox. I'm on Linux if it's relevant. I'm using chrono 0.4.19.
The text was updated successfully, but these errors were encountered: