Update Rust crate chrono to ~0.4.24
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
chrono | dependencies | patch |
~0.4 -> ~0.4.24
|
Release Notes
chronotope/chrono
v0.4.24
: 0.4.24
This is a small maintenance release with accumulated fixes and improvements.
- Fix doc on
Days::new()
to refer to days, not months (#874, thanks to @brotskydotcom) - Clarify out of range value for
from_timestamp_opt()
(#879, thanks to @xmo-odoo) - Add
format_localized()
forNaiveDate
(#881, thanks to @mseele) - Fix bug in
Add
/Sub
Days
, add tests with DST timezone (#878) - Make
NaiveTime::MIN
public (#890) - Fix
from_timestamp_millis()
implementation and add more tests (#885) - Fix typo in docstrings (#897, thanks to @dandxy89)
- Add test proving that #903 is fixed in 0.4.x head (#905, thanks to @umanwizard)
- Add
from_timestamp_micros()
function (#906, thanks to @umanwizard) - Check cargo-deny in CI (#909)
- Derive
Hash
for most pub types that also derivePartialEq
(#938, thanks to @bruceg) - Update deprecated methods in
from_utc()
example (#939, thanks to @greg-el) - Fix panic in
DateTime::checked_add_days()
(#942, thanks to @Ekleog) - More documentation for dates before 1 BCE or after 9999 CE (#950, thanks to @cgit)
- Improve
FixedOffset
docs (#953, thanks to @klnusbaum) - Add chrono-fuzz to CI and update its libfuzzer-sys dependency (#968, thanks to @LingMan)
- Fixes to parsing and calculation of week numbers (#966, thanks to @raphaelroosz)
- Make iana-time-zone a target specific dependency (#980, thanks to @krtab)
- Make eligible functions
const
(#984, thanks to @tormeh)
Thanks to all contributors from the chrono team, @esheppa and @djc.
v0.4.23
: 0.4.23
0.4.23 is the next 0.4 release of the popular chrono date and time library for Rust. After the 0.4.20-0.4.22 series that brought chrono back to life after a long hiatus, development has been fairly quiet, allowing us to start planning changes for the 0.5.0 release. As such, we've started deprecating some APIs that are likely to be removed in 0.5. If you have any feedback on these changes, please let us know in the issue tracker!
Deprecations
- Deprecate methods that have an
_opt()
alternative (#827) - Deprecate usage of the
Date<Tz>
type (#851)
Features
- Optimize RFC 3339 (and RFC 2822) encoding (#844, thanks to @conradludgate)
- Addition and subtraction with the
Days
type (#784) - Add
NaiveDateTime::from_timestamp_millis(_opt)
(#818, thanks to @Pscheidl -- backported in #823) - Allow for changing TZ variable and cache it for
Local
timezone (#853) - Add optional support for the
arbitrary::Arbitrary
trait (#849, thanks to @greyblake and @asayers)
Fixes
On behalf of @esheppa and @djc, thanks to all contributors!
v0.4.22
: 0.4.22
Unfortunately the introduction of the iana-time-zone dependency in 0.4.21 caused some new regressions with lesser known platforms. This release fixes all of the issues we've encountered, improving the situation on some WebAssembly targets, SGX and on macOS/iOS. We've improved our CI setup to hopefully catch more of these issues before release in the future.
- Make wasm-bindgen optional on
wasm32-unknown-unknown
target (#771) - Avoid iana-time-zone dependency on
x86_64-fortanix-unknown-sgx
(#767, thanks to @trevor-crypto) - Update
iana-time-zone
version to 0.1.44 to avoid cyclic dependencies (#773, thanks to @Kijewski for the upstream MRs) - Clarify documentation about year range in formatting/parsing (#765)
v0.4.21
: 0.4.21
0.4.21 is a bugfix release that mainly fixes one regression from 0.4.20:
- Fall back to UTC in case no timezone is found. Unfortunately this is a regression from the changes we made in 0.4.20 where we now parse the timezone database ourselves. Before 0.4.20,
TimeZone::now()
fell back to UTC in the case it could not find the current timezone, but the new implementation panicked in that case. - Correctly detect timezone on Android (also #756). Android does have the timezone database installed, but it's in a different path, and it does not use
/etc/localtime
to keep track of the current timezone. Instead we now use the iana-time-zone crate as a dependency, since it already has quite a bit of logic for finding the current timezone on a host of platforms.
Additionally, there is a documentation fix that reverts an incorrect guarantee:
- Document that
%Y
can have a negative value, both in formatting and in parsing (#760, thanks to @alex)
v0.4.20
: 0.4.20
chrono is a date and time library for Rust and 0.4.20 is the first chrono release since Sep 2020. There has been a long hiatus since the previous maintainer was no longer able to spend much time on the crate; thanks to @quodlibetor for their stewardship of the chrono crate for many years! The new maintainers are @djc and @esheppa. Our first priority has been fixing the soundness issues with calls to localtime_r()
as first reported in #499 and the RUSTSEC-2020-0159 advisory. In order to do this we adapted code from the tz-rs crate maintained by @x-hgg-x for use within chrono -- thanks for working on that! With the new implementation, chrono uses safe Rust code to parse the timezone data files on Unix platforms directly instead of relying on libc.
Due to compatibility reasons, this release does not yet remove the time 0.1 dependency, though chrono 0.4.20 does not depend on the vulnerable parts of the time 0.1.x versions. In a future 0.5 release, we will remove the time dependency.
The minimum supported Rust version for 0.4.20 is 1.32.0, which is intentionally still quite conservative. If you are using chrono 0.4 with a Rust version older than 1.52, we'd like to hear from you since we'd like to further modernize the code base to ease maintenance.
Fixes
- Fix unsound call to
localtime_r()
by parsing timezone files in Rust on Unix (#677 and #728) - Allow RFC 2822 parser to deal with comments (#733 then #737, thanks to @Finomnis)
- Avoid panicking during parsing (#686, thanks to @botahamec)
- Avoid panics when rounding durations (#659, thanks to @ARBaart)
- Fix
Duration::abs()
behavior in case of negative durations with nanoseconds (#734, thanks to @abreis)
Additions
- Make
ParserErrorKind
public and available throughParseError::kind()
(#588, thanks to @sbrocket) - Expose associated
MIN
andMAX
const values in favor of free-standing consts (#726) - Add (optional) support for rkyv (#644 and #701, thanks to @dovahcrow)
- Support month-based calculations against
NaiveDate
(#732 with follow up in #752, thanks to @avantgardnerio) - Add
NaiveWeek
type to facilitate week-based calculations (#666, thanks to @sestrella) - Add
NaiveDateTime::and_local_timezone()
method (#711, thanks to @botahamec) - Add
DateTime::from_local()
method (#572, thanks to @retrhelo) - Extend serde integration for
NaiveDateTime
(#664, thanks to @nickelc) - Implement
DoubleEndedIterator
forNaiveDateDaysIterator
/NaiveDateWeeksIterator
(#697, thanks to @teobouvard) - Implement
std::iter::Sum
forDuration
(#522, thanks to @jakevossen5) - Add
years_since()
method toDateTime
/Date
(#557 then #707, thanks to @yozhgoor) - Implement
AddAssign
/SubAssign
forDateTime
/Date
(#698, thanks to @MrGunflame) - Fix imports on WASM targets (#672, thanks to @danielalvsaaker)
- Implement std::error::Error for ParseWeekdayError (#745)
Non-functional improvements
- Improve CI to better exercise WASM targets (#662, thanks to @AmateurECE)
- More WASM testing improvements, enable dependencies by default (#746)
- Fix compiling for wasm32-unknown-emscripten target (#568, thanks to @orion78fr)
- Use stub implementation for anything not unix and not windows (#593, thanks to @yu-re-ka)
- Remove now unused libc dependency (#710, thanks to @metent)
- Clean up some clippy warnings (#721, thanks to @botahamec)
- Clarify documentation for
Utc::now()
(#647, thanks to @ModProg) - Clarify documentation for
DateTime::with_timezone()
(#747, thanks to @kevincox) - Improve examples for
naive
serde integration (#616, thanks to @nickelc) - Clean up
extern crate
statements and outdated comments (#665, thanks to @nickelc) - Fix typo in deprecation notice (#744, thanks to @Mike-Dax)
- Fix some typos in documentation (#680 and #695, thanks to @cuishuang and @fxredeemer)
- Implement caching for CI (#609, thanks to @Milo123459)
v0.4.19
- Correct build on solaris/illumos
v0.4.18
- Restore support for x86_64-fortanix-unknown-sgx
v0.4.17
- Fix a name resolution error in wasm-bindgen code introduced by removing the dependency on time v0.1
v0.4.16
Features
-
Add %Z specifier to the
FromStr
, similar to the glibc strptime (does not set the offset from the timezone name) -
Drop the dependency on time v0.1, which is deprecated, unless the
oldtime
feature is active. This feature is active by default in v0.4.16 for backwards compatibility, but will likely be removed in v0.5. Code that importstime::Duration
should be switched to importchrono::Duration
instead to avoid breakage.
v0.4.15
Fixes
- Correct usage of vec in specific feature combinations (@quodlibetor)
v0.4.14
Features
- Add day and week iterators for
NaiveDate
(@gnzlbg & @robyoung) - Add a
Month
enum (@hhamana) - Add
locales
. All format functions can now use locales, see the documentation for theunstable-locales
feature. - Fix
Local.from_local_datetime
method for wasm
Improvements
- Added MIN and MAX values for
NaiveTime
,NaiveDateTime
andDateTime<Utc>
.
v0.4.13
Features
- Add
DurationRound
trait that allows rounding and truncating byDuration
(@robyoung)
Internal Improvements
- Code improvements to impl
From
forjs_sys
in wasm to reuse code (@schrieveslaach)
v0.4.12
New Methods and impls
Compatibility improvements
- impl
From
forjs_sys
in wasm (#424 @schrieveslaach) - Bump required version of
time
for redox support.
Bugfixes
- serde modules do a better job with
Option
types (#417 @mwkroening and #429 @fx-kirin) - Use js runtime when using wasmbind to get the local offset (#412 @quodlibetor)
Internal Improvements
- Migrate to github actions from travis-ci, make the overall CI experience more comprehensible, significantly faster and more correct (#439 @quodlibetor)
v0.4.11
Improvements
- Support a space or
T
inFromStr
forDateTime<Tz>
, meaning that e.g.dt.to_string().parse::<DateTime<Utc>>()
now correctly works on round-trip. (@quodlibetor in #378) - Support "negative UTC" in
parse_from_rfc2822
(@quodlibetor #368 reported in #102) - Support comparisons of DateTimes with different timezones (@dlalic in #375)
- Many documentation improvements
Bitrot and external integration fixes
- Don't use wasmbind on wasi (@coolreader18 #365)
- Avoid deprecation warnings for
Error::description
(@AnderEnder and @quodlibetor #376)
Internal improvements
- Use Criterion for benchmarks (@quodlibetor)
v0.4.10
Compatibility notes
- Putting some functionality behind an
alloc
feature to improve no-std support (in #341) means that if you were relying on chrono withno-default-features
and using any of the functions that require alloc support (i.e. any of the string-generating functions liketo_rfc3339
) you will need to add thealloc
feature in your Cargo.toml.
Improvements
-
DateTime::parse_from_str
is more than 2x faster in some cases. (@michalsrb #358) - Significant improvements to no-std and alloc support (This should also make many format/serialization operations induce zero unnecessary allocations) (@CryZe #341)
Features
- Functions that were accepting
Iterator
ofItem
s (for exampleformat_with_items
) now acceptIterator
ofBorrow<Item>
, so one can use values or references. (@michalsrb #358) - Add built-in support for structs with nested
Option<Datetime>
etc fields (@manifest #302)
Internal/doc improvements
- Use markdown footnotes on the
strftime
docs page (@qudlibetor #359) - Migrate from
try!
->?
(question mark) because it is now emitting deprecation warnings and has been stable since rustc 1.13.0 - Deny dead code
v0.4.9
Fixes
- Make Datetime arithmatic adjust their offsets after discovering their new timestamps (@quodlibetor #337)
- Put wasm-bindgen related code and dependencies behind a
wasmbind
feature gate. (@quodlibetor #335)
v0.4.8
Fixes
- Add '0' to single-digit days in rfc2822 date format (@wyhaya #323)
- Correctly pad DelayedFormat (@SamokhinIlya #320)
Features
- Support
wasm-unknown-unknown
via wasm-bindgen (in addition to emscripten/wasm-unknown-emscripten
). (finished by @evq in #331, initial work by @jjpe #287)
v0.4.7
Fixes
- Disable libc default features so that CI continues to work on rust 1.13
- Fix panic on negative inputs to timestamp_millis (@cmars #292)
- Make
LocalResult
Copy/Eq/Hash
Features
- Add
std::convert::From
conversions between the different timezone formats (@mqudsi #271) - Add
timestamp_nanos
methods (@jean-airoldie #308) - Documentation improvements
v0.4.6
Maintenance
- Doc improvements -- improve README CI verification, external links
- winapi upgrade to 0.3
v0.4.5
Features
- Added several more serde deserialization helpers (@novacrazy #258)
- Enabled all features on the playground (@davidtwco #267)
- Derive
Hash
onFixedOffset
(@LuoZijun #254) - Improved docs (@storyfeet #261, @quodlibetor #252)
v0.4.4
Features
- Added support for parsing nanoseconds without the leading dot (@emschwartz #251)
v0.4.3
Features
- Added methods to DateTime/NaiveDateTime to present the stored value as a number of nanoseconds since the UNIX epoch (@harkonenbade #247)
- Added a serde serialise/deserialise module for nanosecond timestamps. (@harkonenbade #247)
- Added "Permissive" timezone parsing which allows a numeric timezone to be specified without minutes. (@quodlibetor #242)
v0.4.2
Deprecations
- More strongly deprecate RustcSerialize: remove it from documentation unless the feature is enabled, issue a deprecation warning if the rustc-serialize feature is enabled (@quodlibetor #174)
Features
- Move all uses of the system clock behind a
clock
feature, for use in environments where we don't have access to the current time. (@jethrogb #236) - Implement subtraction of two
Date
s,Time
s, orDateTime
s, returning aDuration
(@tobz1000 #237)
v0.4.1
- Correct build on solaris/illumos
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.