chrono
chrono copied to clipboard
Date and time library for Rust
fix #702 - [x] Have you added yourself and the change to the [changelog]? (Don't worry about adding the PR number) - [x] If this pull request fixes a bug,...
When using .format("%x") the documentation implies the date will be formatted however the user's computer represents the date, i.e. MM/DD/YY in the USA, or DD/MM/YY in Germany. However, my application...
I'm been using chrono as a reference implementation while fuzzing my own code, and I've found an error in chrono. `.to_string()` correctly rounds seconds up to account for nanoseconds exceeding...
``` assert!(NaiveDate::parse_from_str("2015/9/31", "%Y/%m/%d").is_err()); assert!(NaiveDate::parse_from_str("10/10/2021", "%d/%m/%Y").is_err()); ``` thread 'main' panicked at 'assertion failed: NaiveDate::parse_from_str(\"10/10/2021\", \"%d/%m/%Y\").is_err()',
```rust extern crate chrono; // 0.4.19 use chrono::{FixedOffset, Utc, Duration, DurationRound, Timelike}; fn main() { let t = Utc::now(); let t = t.with_timezone(&FixedOffset::east(9 * 3600)); let t = t.duration_trunc(Duration::days(1)).unwrap(); assert_eq!(t.second(),...
Hello, I'm using chrono in WASM. My local timezone is UTC+2, but I get the same string twice when running this code: ```rust let date : chrono::DateTime = ...; println!("{}",...
Hello, I would like to raise a few problems with the current documentation, which I would like to improve a bit. Personally, I'm pretty confident with the “new” [Java Time...
The following test fails on glibc Linux: ```rust #[test] fn test() { use chrono::offset::local::datetime_to_timespec; std::env::set_var("TZ", "Europe/Paris"); let date = NaiveDate::from_ymd(2021, 10, 31); let date_time_1_30 = date.and_hms(1, 30, 0); let date_time_2_00...
This would allow to specify things like: ```const THRESHOLD: Duration = Duration::seconds(3);```