-
Notifications
You must be signed in to change notification settings - Fork 590
Closed
Description
I have a crate that uses chrono extensively, and I am trying to enable that crate to target WASM.
However, I've traced a panic!
I'm getting to the UTC::now()
constructor fn. Specifically:
#[cfg(feature="clock")]
impl Utc {
// ...
pub fn now() -> DateTime<Utc> {
let spec = oldtime::get_time(); // <-- offending line
let naive = NaiveDateTime::from_timestamp(spec.sec, spec.nsec as u32);
DateTime::from_utc(naive, Utc)
}
}
I'm hoping a fix for this can be as easy as an extra version of UTC::now()
for WASM, but I'm unsure.
David-OConnor, jasonwilliams, soulcorrea, ctaggart, jamwaffles and 3 more
Metadata
Metadata
Assignees
Labels
No labels