chrono
chrono copied to clipboard
Date and time library for Rust
The function [`Date::and_time(...)`](https://docs.rs/chrono/0.4.19/chrono/struct.Date.html#method.and_time) looks to have incorrect documentation. This function states: > Panics on invalid datetime. But the function returns an `Option` and it looks like it will return `None`...
Hello, I tried that code. (https://github.com/higumachan/chrono-wasi-check) I got error in WASI. ```rust use chrono::prelude::*; fn get_another_epoch(timezone: &T) -> Date where T: TimeZone, { timezone.ymd(1969, 1, 1) } fn get_unix_epoch(timezone: &T)...
We are using `proptest` to generate arbitrary timestamps and we have to limit the actual inputs that are generated to `u32` for this function to not panic. ~Any reason why...
As of right now chrono can't parse days' suffixes. For example: `2nd of December` can't be parsed as there is no specifiers that can parse days with suffixes, or just...
I attempted, and failed, to use `chrono` to parse a number of ISO8601 datetime formats. Looking through existing issues (e.g., https://github.com/chronotope/chrono/issues/244), it appears that `chrono` is more in accordance with...
I'm trying to deserialize an ISO 8601 date which includes a trailing `Z`. Weirdly enough, the deserializer doesn't seem to support this and going further into the code, it seems...
Parsing negative NaiveDateTime timestamps with #[serde(with = "ts_milliseconds")] (and other implementations) fails. ```rust use chrono::{NaiveDateTime}; // 0.4.19 use chrono::naive::serde::ts_milliseconds::deserialize as from_milli_ts; use serde::Deserialize; #[derive(Deserialize)] struct S { #[serde(deserialize_with = "from_milli_ts")]...
Right now I'm parsing some information I receive in UDP messages. Some of that information is timestamped but if something goes wrong on the sender I can receive random bytes...
For some reason, [this `impl`](https://github.com/chronotope/chrono/blob/main/src/datetime.rs#L391-L399) uses a fixed offset of zero. This is surprising, because `FixedOffset` can represent `Local` offsets—indeed, `Local` *is* a `FixedOffset` internally—but instead this information is being...
I'm very new to Rust, so this could be misunderstanding the language and/or the library, but it seems that `DateTime#signed_duration_since` could borrow the value as read-only since it is a...