Update Rust crate time to 0.3 - autoclosed #12
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/time-0.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
0.2->0.3Release Notes
time-rs/time
v0.3.16Compare Source
Changed
serde-well-knownfeature flag is deprecated. The necessary features for an item to beenabled are indicated in documentation.
Added
consts can now be provided as the format description fortime::serde::format_description!. Theconstmust be of type&[FormatItem<'_>], which is what is returned by thetime::macros::format_description!macro.Compatibility
was unsupported. These flags are:
js-sysquickcheck-depitoatime-macrosv0.3.15Compare Source
Changed
tm_gmtoffextension. This should eliminate build failures on some untestedplatforms.
Debugoutput for types are now human-readable. While this should not be relied upon, it iscurrently the same as the output with
Display.panic. This was previously only the case in debug mode.
NaNis passed toDuration::from_secs_f32orDuration::from_secs_f64.Fixed
OffsetDateTimeto anotherUtcOffset. Thisoccurred due to an old assumption in code that was no longer the case.
v0.3.14Compare Source
Changed
Duration::unsigned_absis nowconst fn.time::format_description::well_known::Iso8601now has a default. Thismeans
Iso8601is the same asIso8601::DEFAULT.Parsedstruct has been reduced in size from 56 to 32 bytes (a 43% reduction).v0.3.13Compare Source
Fixed
wasm-bindgenwork again.v0.3.12Compare Source
Added
js-sysnow supports obtaining the system's local UTC offset.Changed
Dateoperations has improved when using thelarge-datesfeature.OffsetDateTimenow stores the value in the attachedUtcOffset, notUTC. This leads to significant performance gains on nearly all
OffsetDateTimemethods.Fixed
Times can no longer panic. This previously occurred in some situations where theresult was invalid.
v0.3.11Compare Source
Fixed
serdeTimesubtracted fromTimecan panic. This was caused by a bug that has always existed,in that an internal invariant was not upheld. Memory safety was not violated.
v0.3.10Compare Source
Added
Duration::unsigned_abs, which returns astd::time::DurationDurationcan now be formatted with a.Nspecifier, providing a shorter representation whenusing
Display.nullasNoneon serde structsFixed
Rfc3339.Changed
Rfc2822has been improved.only serves to catch bugs and is disabled in release mode.
v0.3.9Added
time::serde::format_description!time::format_description!, but it generates a module that can be usedin
#[serde(with = "foo")]. This makes it far easier to serialize/deserialize a custom format.Date::replace_yearDate::replace_monthDate::replace_dayTime::replace_hourTime::replace_minuteTime::replace_secondTime::replace_millisecondTime::replace_microsecondTime::replace_nanosecondPrimitiveDateTime::replace_yearPrimitiveDateTime::replace_monthPrimitiveDateTime::replace_dayPrimitiveDateTime::replace_hourPrimitiveDateTime::replace_minutePrimitiveDateTime::replace_secondPrimitiveDateTime::replace_millisecondPrimitiveDateTime::replace_microsecondPrimitiveDateTime::replace_nanosecondOffsetDateTime::replace_yearOffsetDateTime::replace_monthOffsetDateTime::replace_dayOffsetDateTime::replace_hourOffsetDateTime::replace_minuteOffsetDateTime::replace_secondOffsetDateTime::replace_millisecondOffsetDateTime::replace_microsecondOffsetDateTime::replace_nanosecondParsed::offset_minute_signedParsed::offset_second_signedParsed::set_offset_minute_signedParsed::set_offset_second_signedParsed::with_offset_minute_signedParsed::with_offset_second_signederror::InvalidVariantimpl FromStrforWeekdayimpl FromStrforMonthimpl Display for DurationDeprecated
The following methods have been deprecated in favor of the new, signed equivalent methods. The
pre-existing methods
Parsed::offset_minuteParsed::offset_secondParsed::set_offset_minuteParsed::set_offset_secondParsed::with_offset_minuteParsed::with_offset_secondChanged
TryFromParsed::ComponentRangeerrorvariant if the leap second could not occur at that given moment.
v0.3.8This release is broken and has been yanked.
v0.3.7Compare Source
Fixed
Solaris and Illumos build again.
v0.3.6Compare Source
Added
Date::saturating_addDate::saturating_subPrimitiveDateTime::saturating_addPrimitiveDateTime::saturating_subOffsetDateTime::saturating_addOffsetDateTime::saturating_subPrimitiveDatetime::MINPrimitiveDatetime::MAXRfc2822format descriptionserde-well-knownfeature flag.Changed
num_threadscrate.format fails to deserialize.
Fixed
v0.3.5Compare Source
Added
Date::checked_addDate::checked_subPrimitiveDateTime::checked_addPrimitiveDateTime::checked_subOffsetDateTime::checked_addOffsetDateTime::checked_subChanged
single-threaded. This does not affect other Unix platforms. As a reminder, the relevant methods
are fallible and may return an
Errvalue for any reason.v0.3.4Compare Source
Added
error::DifferentVariantandError::DifferentVariantimpl From<Component> for FormatItem<'_>impl TryFrom<FormatItem<'_>> for Componentimpl<'a> From<&'a [FormatItem<'_>]> for FormatItem<'a>impl<'a> TryFrom<FormatItem<'a>> for &[FormatItem<'a>]impl PartialEq<Component> for FormatItem<'_>impl PartialEq<FormatItem<'_>> for Componentimpl PartialEq<&[FormatItem<'_>]> for FormatItem<'_>impl PartialEq<FormatItem<'_>> for &[FormatItem<'_>]impl TryFrom<Error> for error::TryFromParsedimpl TryFrom<Error> for error::Parseimpl TryFrom<Error> for error::ParseFromDescriptionimpl TryFrom<Error> for error::InvalidFormatDescriptionimpl TryFrom<Error> for error::IndeterminateOffsetimpl TryFrom<Error> for error::Formatimpl TryFrom<Error> for error::ConversionRangeimpl TryFrom<Error> for error::ComponentRangeimpl TryFrom<error::TryFromParsed> for error::ComponentRangeimpl TryFrom<error::Parse> for error::TryFromParsedimpl TryFrom<error::Parse> for error::ParseFromDescriptionimpl TryFrom<error::Format> for std::io::Errorimpl Sum for Durationimpl Sum<&Duration> for Durationconst fn default()has been added to all modifiers that arestructs. These methods exist topermit construction in
constcontexts and may be removed (without being considered a breakingchange) once
impl const Defaultis stabilized.FormatItem::Optional, which will consume the contained value if present but still succeedotherwise.
FormatItem::First, which will consume the first successful parse, ignoring any prior errors.Fixed
UtcOffsetcomponent now indicates the error comes from the offset.v0.3.3Compare Source
Added
Parsed::parse_itemParsed::parse_itemsParsed::parse_literalParsedformat_description!macro now supports thecase_sensitivemodifier.Changed
The minimum supported version is now 1.51.0.
v0.3.2Compare Source
Added
Instantis now#[repr(transparent)]Fixed
Datefrom its ISO year, week, and weekday now returns the correct value in allcircumstances. Previously, dates with an ISO year less than zero may have returned incorrect
values. This affects both the
Date::from_iso_week_datemethod and thedate!macro.v0.3.1Compare Source
Changed
serde-well-knownfeature flag is deprecated. The necessary features for an item to beenabled are indicated in documentation.
Added
consts can now be provided as the format description fortime::serde::format_description!. Theconstmust be of type&[FormatItem<'_>], which is what is returned by thetime::macros::format_description!macro.Compatibility
was unsupported. These flags are:
js-sysquickcheck-depitoatime-macrosv0.3.0Compare Source
Added
datetime!macro, which allows the construction of a statically verifiedPrimitiveDateTimeorOffsetDateTime.PrimitiveDateTime::replace_timePrimitiveDateTime::replace_dateOffsetDateTime::replace_timeOffsetDateTime::replace_dateOffsetDateTime::replace_date_timeOffsetDateTime::replace_offset#![no_alloc]supportDate::to_iso_week_date, replacingDate::iso_year_weekDate::MINDate::MAXUtcOffset::from_hmsUtcOffset::from_whole_secondsUtcOffset::as_hmsUtcOffset::whole_hoursUtcOffset::whole_minutesUtcOffset::minutes_past_hourUtcOffset::seconds_past_minuteUtcOffset::is_utcUtcOffset::is_positiveUtcOffset::is_negativeOffsetDateTime::sunday_based_weekOffsetDateTime::monday_based_weekPrimitiveDateTime::to_calendar_datePrimitiveDateTime::to_ordinal_datePrimitiveDateTime::to_iso_week_datePrimitiveDateTime::to_julian_dayOffsetDateTime::to_calendar_dateOffsetDateTime::to_ordinal_dateOffsetDateTime::to_iso_week_dateOffsetDateTime::to_julian_dayTime::as_hmsTime::as_hms_milliTime::as_hms_microTime::as_hms_nanoPrimitiveDateTime::as_hmsPrimitiveDateTime::as_hms_milliPrimitiveDateTime::as_hms_microPrimitiveDateTime::as_hms_nanoOffsetDateTime::to_hmsOffsetDateTime::to_hms_milliOffsetDateTime::to_hms_microOffsetDateTime::to_hms_nanoDuration::saturating_addDuration::saturating_subDuration::saturating_mulutil::days_in_year_monthMonthInstant::into_innerimpl AsRef<StdInstant>andimpl Borrow<StdInstant>forInstantuser-provided flag. This functionality is not tested in any way and is not guaranteed to work.
Library authors are unable to enable this feature, as it must be passed via
RUSTFLAGS. Furtherinformation is available in the documentation.
Changed
within the 0.3 series without being a breaking change.
macrosfeature flag.OffsetDatetime::timestamp→OffsetDateTime::unix_timestampOffsetDatetime::timestamp_nanos→OffsetDateTime::unix_timestamp_nanosDate::try_from_ymd→Date::from_calendar_dateDate::try_from_yo→Date::from_ordinal_dateDate::try_from_iso_ywd→Date::from_iso_week_dateDate::as_ymd→Date::to_calendar_dateDate::as_yo→Date::to_ordinal_dateDate::try_with_hms→Date::with_hmsDate::try_with_hms_milli→Date::with_hms_milliDate::try_with_hms_micro→Date::with_hms_microDate::try_with_hms_nano→Date::with_hms_nanoTime::try_from_hms→Time::from_hmsTime::try_from_hms_milli→Time::from_hms_milliTime::try_from_hms_micro→Time::from_hms_microTime::try_from_hms_nano→Time::from_hms_nanoUtcOffset::try_local_offset_at→UtcOffset::local_offset_atUtcOffset::as_seconds→UtcOffset::whole_secondsOffsetDateTime::try_now_local→OffsetDateTime::now_localDate::week→Date::iso_weekPrimitiveDateTime::week→PrimitiveDateTime::iso_weekOffsetDateTime::week→OffsetDateTime::iso_weekDate::julian_day→Date::to_julian_dayDurationunit values, as well as the minimum and maximum, are now associated constants.OffsetDateTime::unix_epoch()→OffsetDateTime::UNIX_EPOCHTime::midnight()→Time::MIDNIGHTconst fn(on at least newer compilers)Date::weekdayDate::next_dayDate::previous_dayPrimitiveDateTime::assume_offsetPrimitiveDateTime::weekdayDuration::checked_addDuration::checked_subDuration::checked_mulOffsetDateTime::from_unix_timestampOffsetDateTime::from_unix_timestamp_nanosOffsetDateTime::dateOffsetDateTime::timeOffsetDateTime::yearOffsetDateTime::monthOffsetDateTime::dayOffsetDateTime::ordinalOffsetDateTime::to_iso_week_dateOffsetDateTime::weekOffsetDateTime::weekdayOffsetDateTime::hourOffsetDateTime::minuteOffsetDateTime::secondOffsetDateTime::millisecondOffsetDateTime::microsecondOffsetDateTime::nanosecondOffsetDateTime::unix_timestampOffsetDateTime::unix_timestamp_nanosResult:Date::from_julian_dayOffsetDateTime::from_unix_timestampOffsetDateTime::from_unix_timestamp_nanosOption:Date::next_dayDate::previous_daylarge-datesfeature, this is increased to ±999,999. Enabling the feature has performance implications and
introduces ambiguities when parsing.
local-offsetfeature:UtcOffset::local_offset_atOffsetDateTime::now_localInstantis now guaranteed to be represented as a tuple struct containing astd::time::Instant.Date::to_julian_daynow returns ani32(wasi64).Date::from_julian_daynow accepts ani32(wasi64).be used with value literals, the breakage caused by this should be minimal.
Monthenum is used instead of numerical values where appropriate.Removed
PreciseTimeSteadyTimeprecise_time_nsprecise_time_sInstant::toDuration::num_weeksDuration::num_daysDuration::num_hoursDuration::num_minutesDuration::num_secondsDuration::num_millisecondsDuration::num_microsecondsDuration::num_nanosecondsDuration::spanDuration::from_stdDuration::to_stdDate::from_ymdDate::from_yoDate::from_iso_ywdDate::with_hmsDate::with_hms_milliDate::with_hms_microDate::with_hms_nanoTime::from_hmsTime::from_hms_milliTime::from_hms_microTime::from_hms_nanoDate::todayTime::nowPrimitiveDateTime::nowPrimitiveDateTime::unix_epochPrimitiveDateTime::from_unix_timestampPrimitiveDateTime::timestampOffsetDateTime::nowimpl Sub<SystemTime> for PrimitiveDateTimeimpl Sub<PrimitiveDateTime> for SystemTimeimpl PartialEq<SystemTime> for PrimitiveDateTimeimpl PartialEq<PrimitiveDateTime> for SystemTimeimpl PartialOrd<SystemTime> for PrimitiveDateTimeimpl PartialOrd<PrimitiveDateTime> for SystemTimeimpl From<SystemTime> for PrimitiveDateTimeimpl From<PrimitiveDateTime> for SystemTimeUtcOffset::local_offset_at— assumed UTC if unable to determine local offsetOffsetDateTime::now_local— assumed UTC if unable to determine local offsetDuration::signPrimitiveDateTime::using_offsetSigndays_in_yearis_leap_yearvalidate_format_stringweeks_in_yearComponentRangeErrorConversionRangeErrorIndeterminateOffsetErrorParseErrorNumericalDurationNumericalStdDurationNumericalStdDurationShortfmt::Error, indicatingan error unrelated to the time crate.
Time::lazy_formatDate::lazy_formatUtcOffset::lazy_formatPrimitiveDateTime::lazy_formatOffsetDateTime::lazy_formatpreludemodule has been removed in its entirety.Date::iso_year_weekin favor ofDate::to_iso_week_datePrimitiveDateTime::iso_year_weekOffsetDateTime::iso_year_weekUtcOffset::east_hoursUtcOffset::west_hoursUtcOffset::hoursUtcOffset::east_minutesUtcOffset::west_minutesUtcOffset::minutesUtcOffset::east_secondsUtcOffset::west_secondsUtcOffset::secondsDate::month_dayPrimitiveDateTime::month_dayOffsetDateTime::month_dayWeekday::iso_weekday_number(identical toWeekday::number_from_monday)ext::NumericalStdDurationShortv0.2.27Compare Source
v0.2.26Compare Source
Fixed
v0.2.25Compare Source
Fixed
v0.2.24Compare Source
Fixed
OffsetDateTime::timestamp,OffsetDateTime::unix_timestamp,PrimitiveDatetime::timestamp, andOffsetDateTime::unix_timestamphave been corrected. Thisaffects all negative timestamps with a nonzero subsecond value.
v0.2.23Compare Source
Compatibility notes
Due to #293, any method that requires knowledge of the local offset will now
fail on Linux. For
try_methods, this means returning an error. For others,it means assuming UTC.
Deprecated
UtcOffset::timestamp(moved toUtcOffset::unix_timestamp)UtcOffset::timestamp_nanos(moved toUtcOffset::unix_timestamp_nanos)date(moved tomacros::date)time(moved tomacros::time)offset(moved tomacros::offset)OffsetDateTime::now_local(assumes UTC if unable to be determined)UtcOffset::local_offset_at(assumes UTC if unable to be determined)UtcOffset::current_local_offset(assumes UTC if unable to be determined)v0.2.22Compare Source
Fixed
Duration::newcould previously result in an inconsistent internal state. This led to some oddsituations where a
Durationcould be both positive and negative. This has been fixed such thatthe internal state maintains its invariants.
v0.2.21Compare Source
Changed
component being out of range can be directly obtained, while an invalid offset or conversion error
is guaranteed to be a zero-sized type.
const fnon rustc ≥ 1.46:Date::try_from_iso_ywdDate::iso_year_weekDate::weekDate::sunday_based_weekDate::monday_based_weekDate::try_with_hmsDate::try_with_hms_milliDate::try_with_hms_microDate::try_with_hms_nanoPrimitiveDateTime::iso_year_weekPrimitiveDateTime::weekPrimitiveDateTime::sunday_based_weekPrimitiveDateTime::monday_based_weekutil::weeks_in_yearv0.2.20Compare Source
Added
OffsetDateTime::timestamp_nanosOffsetDateTime::from_unix_timestamp_nanosFixed
A bug with far-reaching consequences has been fixed. See #276 for complete details, but the gist is
that the constructing a
Datefrom a valid Julian day may result in an invalid value or even panic.As a consequence of implementation details, this affects nearly all arithmetic with
Dates (and asa result also
PrimitiveDateTimes andOffsetDateTimes).Improvements
OffsetDateTimefrom a timestamp-nanosecond pairv0.2.19Compare Source
Fixed
COMPILING_UNDER_CARGO_WEBenvironmentvariable.
%Dspecifier no longer requires padding on the month. Previously,Err(InvalidMonth)was incorrectly returned.std::time::Durationthat is larger thantime::Duration::max_value()now correctly returnsOrdering::Greaterwhen compared.Sign::Zeronow sets the integer to be zero. Thispreviously left the integer unmodified.
v0.2.18Compare Source
Changed
const fnon rustc ≥ 1.46:Date::try_from_ymdDate::try_from_yoTime::try_from_hmsTime::try_from_hms_milliTime::try_from_hms_microTime::try_from_hms_nanoerrormodule has been created where all existing error types are contained. TheErrorsuffix has been dropped from these types.
extmodule has been created where extension traits are contained.utilmodule has been created where utility functions are contained.error::ComponentRangenow implementsCopy.For back-compatibility, all items that were moved to newly-contained modules have been re-exported
from their previous locations (and in the case of the
errormodule, with their previous name).Fixes
Parsing
format::Rfc3339now correctly handles the UTC offset (#274).v0.2.17Compare Source
Changed
The following functions are
const fnon rustc ≥ 1.46:Date::yearDate::monthDate::dayDate::month_dayDate::ordinalDate::as_ymdDate::as_yoDate::julian_dayDuration::checked_divPrimitiveDateTime::yearPrimitiveDateTime::monthPrimitiveDateTime::dayPrimitiveDateTime::month_dayPrimitiveDateTime::ordinalWeekday::previousWeekday::nextImprovements
size_of::<Date>()has been reduced from 8 to 4. As a consequence,size_of::<PrimitiveDatetime>()went from 16 to 12 andsize_of::<OffsetDateTime>()from 20to 16. This change also results in a performance improvement of approximately 30% on the
Date::yearandDate::ordinalmethods.cfg-ifhas been removed as a dependency.Fixed
cfgflags passed to rustc will no longer collide with other crates (at least unless they'redoing something very stupid).
combinations would fail.
v0.2.16Compare Source
Added
OffsetDateTimes can now be represented as Unix timestamps with serde. To do this, you can use thetime::serde::timestampandtime::serde::timestamp::optionmodules.v0.2.15Compare Source
Fixed
cargo-websupport works, and is now explicitly checked in CI. A previous change was made that madea method call ambiguous.
v0.2.14Compare Source
Fixed
Adding/subtracting a
core::time::Durationnow correctly takes subsecond values into account. Thisalso affects
PrimitiveDateTimeandOffsetDateTime.v0.2.13Compare Source
Fixed
Panicking APIs are re-exposed.
v0.2.12Compare Source
Fixed
Subtracting
Instants can correctly result in a negative duration, rather than resulting in theabsolute value of it.
v0.2.11Compare Source
Added
OffsetDateTime::now_utcDeprecated
OffsetDateTime::nowdue to the offset not being clear from the method name alone.Fixed
Dates are now uniformly random when using therandcrate. Previously, both the year and daywithin the year were uniform, but this meant that any given day in a leap year was slightly less
likely to be chosen than a day in a non-leap year.
Changed
v0.2.10Compare Source
Added
OffsetDateTimes as RFC3339.impl Display, rather than a concrete type.Fixed
v0.2.9Compare Source
Fixed
cfg-ifnow has a mandatory minimum of 0.1.10, rather than just 0.1. This is because compilationfails when using 0.1.9.
v0.2.8Compare Source
Added
cargo_websupport has been added for getting a local offset. A general catch-all defaulting toUTC has also been added.
Error::sourcehas been implemented for the wrappertime::Error.UtcOffset::try_local_offset,UtcOffset::try_current_local_offset,OffsetDateTime::try_now_local()provide fallible alternatives when the default of UTC is notdesired. To facilitate this change,
IndeterminateOffsetErrorhas been added.Changed
#[non_exhaustive]is simulated on compilers prior to 1.40.0.v0.2.7Compare Source
Added
Displayhas been implemented forDate,OffsetDateTime,PrimitiveDateTime,Time,UtcOffset, andWeekday.Hashis now derived forDuration.SystemTimecan be converted to and fromOffsetDateTime. The following trait implementationshave been made for interoperability:
impl Sub<SystemTime> for OffsetDateTimeimpl Sub<OffsetDateTime> for SystemTimeimpl PartialEq<SystemTime> for OffsetDateTimeimpl PartialEq<OffsetDateTime> for SystemTimeimpl PartialOrd<SystemTime> for OffsetDateTimeimpl PartialOrd<OffsetDateTime> for SystemTimeimpl From<SystemTime> for OffsetDateTimeimpl From<OffsetDateTime> for SystemTimeimpl Duration<T> for Standard, allowing usage with therandcrate. This isgated behind the
randfeature flag.NumericalDurationhas been implemented forf32andf64.NumericalStdDurationandNumericalStdDurationShorthave been implemented forf64only.UtcOffset::local_offset_at(OffsetDateTime), which will obtain the system's local offset at theprovided moment in time.
OffsetDateTime::now_local()is equivalent to callingOffsetDateTime::now().to_offset(UtcOffset::local_offset_at(OffsetDateTime::now()))(but moreefficient).
UtcOffset::current_local_offset()will return the equivalent ofOffsetDateTime::now_local().offset().Changed
impl AsRef<str>as parameters, rather than just&str.time::validate_format_stringdoes this as well.Datebeing between the years -100,000 and +100,000 (inclusive) is nowstrictly enforced.
Durationare now enabled by default. This behavior is the identical to whatthe standard library does.
time,date, andoffsetmacros have been added to the prelude.Deprecated
Signhas been deprecated in its entirety, along withDuration::sign.To obtain the sign of a
Duration, you can use theDuration::is_positive,Duration::is_negative, andDuration::is_zeromethods.A number of functions and trait implementations that implicitly assumed a timezone (generally UTC)
have been deprecated. These are:
Date::todayTime::nowPrimitiveDateTime::nowPrimitiveDateTime::unix_epochPrimitiveDateTime::from_unix_timestampPrimitiveDateTime::timestampimpl Sub<SystemTime> for PrimitiveDateTimeimpl Sub<PrimitiveDateTime> for SystemTimeimpl PartialEq<SystemTime> for PrimitiveDateTimeimpl PartialEq<PrimitiveDateTime> for SystemTime>impl PartialOrd<SystemTime> for PrimitiveDateTimeimpl PartialOrd<PrimitiveDateTime> for SystemTime>impl From<SystemTime> for PrimitiveDateTimeimpl From<PrimitiveDateTime> for SystemTimeFixed
Durationis now always in range. Previously, it was possible (viaaddition and/or subtraction) to obtain a value that was not internally consistent.
Time::parseerroneously returned anInvalidMinuteerror when it was actually the second thatwas invalid.
Date::parse("0000-01-01", "%Y-%m-%d")incorrectly returned anErr(#221).v0.2.6Compare Source
Bug fixes
v0.2.5 introduces a major inconsistency, not just in its behavior for
PrimitiveDateTime::using_offset, but also changes its signature, rendering it incapable of being used inconstcontexts.Both the behavior and the function signature have been fixed, while still fixing the underlying issue.
PrimitiveDateTime::using_offsetmentions in the docs that thePrimitiveDateTimeis assumed to be UTC, and is converted to the provided offset. This was the previous behavior.The following functionality had bugs that were fixed (from v0.2.4):
OffsetDateTime::timestampOffsetDateTime::parseOffsetDateTime— Subsecond values were not checked previously. They also relied on the faulty timestamp implementation.OffsetDateTime— Same as equality and comparison. Additionally, hashes would collide withPrimitiveDateTimeif the underlying UTC was the same.OffsetDateTimes previously disregarded the subsecond values.All of these changes are now checked in CI, so regressions will be caught.
v0.2.5Compare Source
Bug fixes
PrimitiveDateTime::using_offsetwas poorly defined, leading to an ambiguity that cause some methods to treat the existing datetime as UTC, while others treated it as the time in the provided offset. This release ensures that the behavior is what I intended — the datetime is assumed to be in the provided offset.NB: This release has been yanked from crates.io due to major back-compatibility issues. These have been fixed in 0.2.6.
v0.2.4Compare Source
v0.2.4 is identical to v0.2.3 with the exception of the breaking change, which has been reverted. v0.2.4 is backwards-compatible with v0.2.2.
v0.2.3Compare Source
v0.2.3 has been yanked from crates.io. The breaking change (with regard to feature flags) should not have been made. By yanking this version, any existing code will continue to work, while new code will not have potential backwards-incompatible behavior. The change was reverted in v0.2.4.
Additions
time!,date!,offset!macrosparsefunction, allowing for type inference.time::Result<T>alias totime::Result<T, time::Error>Deprecated
Panicking APIs have been deprecated in favor of the new macros.
Changes
Minimum supported Rust version is now 1.34, changed from 1.40. This permits a number of crates to upgrade without breaking MSRV.
Bug fixes
A number of parsing methods used unchecked constructors. This was because the values should have been checked prior. They are now.
Breaking changes
The "std" feature has been renamed to "alloc", which disables the standard library. This was necessary to bring MSRV down to 1.34.
v0.2.2Compare Source
Fixed
v0.2.1Compare Source
Fixed
COMPILING_UNDER_CARGO_WEBenvironmentvariable.
%Dspecifier no longer requires padding on the month. Previously,Err(InvalidMonth)was incorrectly returned.std::time::Durationthat is larger thantime::Duration::max_value()now correctly returnsOrdering::Greaterwhen compared.Sign::Zeronow sets the integer to be zero. Thispreviously left the integer unmodified.
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
Update Rust crate time to 0.3to Update Rust crate time to 0.3 - autoclosedPull request closed