Comments (6)
Two things here:
- Leap seconds are not properly handled. A trivial demo shows this using a leap second that has actually occurred. This is a bug and will be fixed.
- If you are using
2023-12-11T11:31:60.000Z
as your test case, don't. Leap seconds have only occurred as the last second of either half of the year (i.e. Jun 30, Dec 31 at 23:59:60). December 11 obviously is not that. Theoretically they can happen at the end of any month (per definition of UTC), but in reality preference is given to June or December, with March and September being alternates.
from time.
- @jhpratt This is not a testcase this is from our logs
from time.
I would suggest looking into your logging system in that case, as it's producing invalid values.
from time.
@jhpratt So this is generated by this function and I got this exact value from logs which was throwing deserialisation error.
from time.
Time
holding a seconds
value of 60 would be the only way for the crate to output that string barring a hard-coded literal in the format description. After quickly checking what is called all the way down, there's no way that that is what's causing this. The seconds
field is ultimately calculated in Time::adjusting_add
, and it's quite easy to verify that the implementation there is correct.
from time.
Fixed on main
. It will be released shortly.
from time.
Related Issues (20)
- fn OffsetDateTime::date_time(self) if private HOT 1
- Optional weekday for rfc2822 HOT 2
- year repr:last_two removed in 0.3.x? HOT 1
- Optional leading zeros and parsing HOT 3
- Implement `FromStr` for `PrimitiveDateTime` and `OffsetDateTime` HOT 1
- `subsec_{milli,micro,nano}seconds` may have over-inclusive documented ranges HOT 1
- Default `impl Deserialize`/`impl Serialize for time::OffsetDateTime` is a footgun HOT 1
- Mark the date_time function from OffsetDateTime as public HOT 1
- Renaming of `FormatItem` is a breaking change HOT 5
- How to use `serde::format_description` with `format_description::well_known` ? HOT 5
- Confusing deprecation message for `time::Instant` HOT 3
- Formatting bug on ISO8601 HOT 6
- Make `format` methods localizable HOT 6
- Error with rust-nightly: type annotations needed for `Box<_>` HOT 5
- Solve "large-dates" ambiguity
- parsing: option to [end] to terminate parsing even if there is further input
- compile error: time-0.3.29/src/format_description/parse/mod.rs:83:9 "type must be known at this point" HOT 1
- Document status of local-offset support HOT 1
- Provide cached local offset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from time.