chrono
chrono copied to clipboard
Date and time library for Rust
This was originally reported here: https://github.com/pola-rs/polars/issues/17167 To reproduce: ```rust [package] name = "scratch" version = "0.1.0" edition = "2021" [dependencies] chrono = "0.4.38" ``` `src/main.rs` ```rust use chrono::NaiveDateTime; fn main()...
This code: ``` use chrono::NaiveDateTime; fn main() { let naive_date_time = NaiveDateTime::parse_from_str("2024-06-07T00:00:00+09:00", "%Y-%m-%dT%H:%M:%S%:z").unwrap(); dbg!(&naive_date_time); let format = "%FT%T%:z"; let delayed_format = naive_date_time.format(format); dbg!(&delayed_format); println!("{}", delayed_format); } ``` Results in these...
In reading around it seems that this was left out because years are not the same length nor are months. The use case I am trying to support is a...
We use bincode for serializationand store bin files, then deserialize for data access. We try to upgrade to bincode 2.0.0-rc.3, however from bincode 2.0.0+ needs Encode, Decode traits to be...
`saturating_*` methods might be quite useful. They are present in standard library for primitive types, so the use case can be quite frequent (?). I found only one mention of...
I have to read large parquet files with 500M-1B records where one of the columns is a datetime. By convention for parquet timestamps are saved as Int96 UTC timestamp. When...
When trying to parse the date/time `"Sun, 28 Apr 2024 11:05:00 GMT"` with `"%a, %d %b %Y %H:%M:%S %Z"` it claims that there is not enough information. Is there something...
It is tricky to slice up the work to convert our parsing module from returning `ParseError` to `Error`. After a couple of attempts the best way seems to be to...
We can't have a generic `From` or `Into` implementation that converts from one `Offset` type into another because the standard library has a blanket implementation of `From for T`. For...
These issues came up when trying to convert our parsing code to the new error types (only 750 errors to go... :laughing:). I would like to restrict the visibility of...