fix(deps): update rust crate time to 0.3.36 - autoclosed #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.3
->0.3.36
Release Notes
time-rs/time (time)
v0.3.36
Compare Source
# Fixed
FormatItem
can be used as part of an import path. See #675 for details.v0.3.35
Compare Source
Added
Duration::checked_neg
ext::InstantExt
, which provides methods for usingtime::Duration
withstd::time::Instant
Changed
Instant
is deprecated. It is recommended to usestd::time::Instant
directly, importingtime::ext::InstantExt
for interoperability withtime::Duration
.FormatItem
has been renamed toBorrowedFormatItem
, avoiding confusion withOwnedFormatItem
.An alias has been added for backwards compatibility.
Fixed
Duration
is documented correctly. The previous documentationcontained an off-by-one error.
v0.3.34
Compare Source
Fixed
Computing the local offset on Windows works again. It was broken in some cases in v0.3.32 and
v0.3.33.
v0.3.33
Compare Source
Fixed
Builds targeting
wasm32-unknown-unknown
now work again.v0.3.32
Compare Source
Added
Date::replace_ordinal
PrimitiveDateTime::replace_ordinal
OffsetDateTime::replace_ordinal
OffsetDateTime
as a Unix timestamp with subsecond precision for serde.time::serde::timestamp::milliseconds
time::serde::timestamp::microseconds
time::serde::timestamp::nanoseconds
Changed
Duration::time_fn
is deprecated.v0.3.31
Compare Source
Added
OffsetDateTime::new_in_offset
OffsetDateTime::new_utc
Changed
UtcOffset
has been expanded from ±23:59:59 to ±25:59:59. This is to supportthe full POSIX range while permitting infallible negation.
v0.3.30
Compare Source
Added
powerfmt::smart_display::SmartDisplay
has been added for the main types in the library. Theseimplementations ensure that values follow the requested fill, width, and alignment when using
format!
or similar macros.Display
is implemented in terms ofSmartDisplay
.Fixed
NumericalDuration
orNumericalStdDuration
.v0.3.29
Compare Source
Added
Date
has been added. BothDate
andOption<Date>
are four bytes.Second::per(Day)
, which returnsthe number of seconds in one day. See the types in the [
time::convert
module][time::convert module] for moreinformation.
Changed
--cfg unsound_local_offset
has been removed.#![feature(no_coverage)]
was previously used internally for code coverage. It is no longer used,so it has been removed.
modifier::OffsetHour
has been changed. This was unintentionally changed inv0.3.17 and went unnoticed until now. The sign is now only present if needed by default, as was
the case previously. This does not affect any situation where
format_description!
orformat_description::parse
is used.Fixed
std::time::Duration
to/from anOffsetDateTime
will not result ininteger overflow internally. It will still panic if the result is out of range.
v0.3.28
Compare Source
Added
Iso8601
format description have been added. Thisavoids the need to manually configure the format.
[end]
component has been added. This is ignored during formatting, but is used to indicatethe end of input when parsing. If any input remains after this component, an error is returned.
This is useful when using the
[first]
component, as it avoids the need to reorder variants.Changed
versions of MacOS do not meet the requirements for the exemption.
UnexpectedTrailingCharacters
error variant has been moved toParseFromDescription
. Allpreviously-existing locations of this variant have been deprecated and will no longer be returned.
v0.3.27
Compare Source
This sets the
serde
dependency requirement to>= 1.0.184
where the binaries have been removed.v0.3.26
Compare Source
This release contains only a single change.
serde
is required to be a version prior to 1.0.171.This is due to the decision by the maintainer of
serde
to include pre-built binaries that areexecuted without the end user's knowledge. As of the time of publishing, the included binary has not
even been reproduced. This is a security risk, and the
time
project strongly opposes thisdecision. While this may break some users' builds due to conflicting versions, it is a necessary
step to ensure the security.
v0.3.25
Compare Source
Fixed
Time::replace_milliseconds
would panic on some out-of-range values. This hasbeen fixed.
v0.3.24
Compare Source
Added
subsecond
component is taken into account when parsing theunix_timestamp
component. Ifdata is conflicting, the
subsecond
value takes precedence.Time
with only thehour
component is now supported. Theminute
andsecond
, andsubsecond
components are assumed to be zero.Changed
Parsed
has been improved.before being rejected in the final step. Now, invalid values are rejected as soon as they are
encountered. This affects the error variant returned, which may cause minor breakage for any code
(incorrectly) relying on the exact error variant.
Time
, an error is returned if components are present but not consecutive. Forexample, if
hours
andseconds
are present,minutes
will not be assumed to be zero.Fixed
Duration::checked_div
could return a slightly incorrect result in somecases. This has been fixed.
v0.3.23
Compare Source
Added
Date::next_occurrence
Date::prev_occurrence
Date::nth_next_occurrence
Date::nth_prev_occurrence
Weekday::nth_prev
Month::nth_next
Month::nth_prev
Changed
The minimum supported Rust version policy has been updated. See the README for
details.
Fixed
Duration::abs
correctly returnsDuration::MAX
when near the minimum value. The nanosecondsvalue was previously incorrect.
in some cases.
v0.3.22
Compare Source
Added
OffsetDateTime::checked_to_offset
v0.3.21
Compare Source
Added
time::serde::format_description!
macro.Weekday::nth_next
Changed
v0.3.20
Compare Source
Changed
offset no longer require a check that the program is single-threaded. This currently includes
MacOS, illumos, and NetBSD.
Added
[ignore]
component in format descriptions. Acount
modifier is required, indicating the numberof bytes to ignore when parsing.
[unix_timestamp]
component in format descriptions. This is currently only usable withOffsetDateTime
. Users can choose between seconds, milliseconds, microseconds, and nanoseconds,and whether the sign is mandatory or optional.
Fixed
v0.3.19
Compare Source
Fixed
This includes the update to the
format_description!
macro, which was supposed to be included in0.3.18.
v0.3.18
Compare Source
Changed
Added
[first]
and[optional]
items can now be included in format descriptions. To parse this atruntime, you must use the
format_description::parse_owned
method.format_description::parse_borrowed
the previous, officially unsupported
RUSTFLAGS="--cfg unsound_local_offset"
. End users may calltime::util::local_offset::set_soundness(time::util::local_offset::Soundness::Unsound)
. Thismethod is
unsafe
because it enables undefined behavior if its safety requirements are notupheld. Note that libraries must not set this to
Unsound
, as it is impossible for a libraryto guarantee end users uphold the required invariants.
Fixed
even if the sign indicated otherwise.
v0.3.17
Compare Source
Changed
time::serde::format_description!
is reduced if not all featureflags are active.
cargo test --tests
works with any configuration of feature flags. This occurs by spawning asubprocess that passes
--all-features
.cargo test --doc
works with most combinations offeature flags, including the default. The combination of these changes means that crater will now
run on
time
.libc
andnum_threads
are only included as dependencies when needed. They were previouslyunconditionally included.
Added
time::format_description::parse_owned
, which returns anOwnedFormatItem
. This avoids "lifetimehell", where all your structs now need a lifetime because a single field has one. Note that when
possible, the borrowed format item (just called
FormatItem
) is still preferred, as it hassignificantly fewer allocations. The new
OwnedFormatItem
is usable for both formatting andparsing, as you would expect.
Compatibility
errors have slightly changed. No existing API has been altered, so this is not a breaking change.
However, you may notice different errors, which are hopefully better! The parser for compile-time
format descriptions has not yet been swapped out. If you notice any bugs, please file an issue.
v0.3.16
Compare Source
Changed
serde-well-known
feature flag is deprecated. The necessary features for an item to beenabled are indicated in documentation.
Added
const
s can now be provided as the format description fortime::serde::format_description!
. Theconst
must be of type&[FormatItem<'_>]
, which is what is returned by thetime::macros::format_description!
macro.Compatibility
was unsupported. These flags are:
js-sys
quickcheck-dep
itoa
time-macros
v0.3.15
Compare Source
Changed
tm_gmtoff
extension. This should eliminate build failures on some untestedplatforms.
Debug
output 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.
NaN
is passed toDuration::from_secs_f32
orDuration::from_secs_f64
.Fixed
OffsetDateTime
to anotherUtcOffset
. Thisoccurred due to an old assumption in code that was no longer the case.
v0.3.14
Compare Source
Changed
Duration::unsigned_abs
is nowconst fn
.time::format_description::well_known::Iso8601
now has a default. Thismeans
Iso8601
is the same asIso8601::DEFAULT
.Parsed
struct has been reduced in size from 56 to 32 bytes (a 43% reduction).v0.3.13
Compare Source
Fixed
wasm-bindgen
work again.v0.3.12
Compare Source
Added
js-sys
now supports obtaining the system's local UTC offset.Changed
Date
operations has improved when using thelarge-dates
feature.OffsetDateTime
now stores the value in the attachedUtcOffset
, notUTC. This leads to significant performance gains on nearly all
OffsetDateTime
methods.Fixed
Time
s can no longer panic. This previously occurred in some situations where theresult was invalid.
v0.3.11
Compare Source
Fixed
serde
Time
subtracted fromTime
can 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.10
Compare Source
Added
Duration::unsigned_abs
, which returns astd::time::Duration
Duration
can now be formatted with a.N
specifier, providing a shorter representation whenusing
Display
.null
asNone
on serde structsFixed
Rfc3339
.Changed
Rfc2822
has been improved.only serves to catch bugs and is disabled in release mode.
v0.3.9
Added
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_year
Date::replace_month
Date::replace_day
Time::replace_hour
Time::replace_minute
Time::replace_second
Time::replace_millisecond
Time::replace_microsecond
Time::replace_nanosecond
PrimitiveDateTime::replace_year
PrimitiveDateTime::replace_month
PrimitiveDateTime::replace_day
PrimitiveDateTime::replace_hour
PrimitiveDateTime::replace_minute
PrimitiveDateTime::replace_second
PrimitiveDateTime::replace_millisecond
PrimitiveDateTime::replace_microsecond
PrimitiveDateTime::replace_nanosecond
OffsetDateTime::replace_year
OffsetDateTime::replace_month
OffsetDateTime::replace_day
OffsetDateTime::replace_hour
OffsetDateTime::replace_minute
OffsetDateTime::replace_second
OffsetDateTime::replace_millisecond
OffsetDateTime::replace_microsecond
OffsetDateTime::replace_nanosecond
Parsed::offset_minute_signed
Parsed::offset_second_signed
Parsed::set_offset_minute_signed
Parsed::set_offset_second_signed
Parsed::with_offset_minute_signed
Parsed::with_offset_second_signed
error::InvalidVariant
impl FromStr
forWeekday
impl FromStr
forMonth
impl Display for Duration
Deprecated
The following methods have been deprecated in favor of the new, signed equivalent methods. The
pre-existing methods
Parsed::offset_minute
Parsed::offset_second
Parsed::set_offset_minute
Parsed::set_offset_second
Parsed::with_offset_minute
Parsed::with_offset_second
Changed
TryFromParsed::ComponentRange
errorvariant if the leap second could not occur at that given moment.
v0.3.8
This release is broken and has been yanked.
v0.3.7
Compare Source
Fixed
Solaris and Illumos build again.
v0.3.6
Compare Source
Added
Date::saturating_add
Date::saturating_sub
PrimitiveDateTime::saturating_add
PrimitiveDateTime::saturating_sub
OffsetDateTime::saturating_add
OffsetDateTime::saturating_sub
PrimitiveDatetime::MIN
PrimitiveDatetime::MAX
Rfc2822
format descriptionserde-well-known
feature flag.Changed
num_threads
crate.format fails to deserialize.
Fixed
v0.3.5
Compare Source
Added
Date::checked_add
Date::checked_sub
PrimitiveDateTime::checked_add
PrimitiveDateTime::checked_sub
OffsetDateTime::checked_add
OffsetDateTime::checked_sub
Changed
single-threaded. This does not affect other Unix platforms. As a reminder, the relevant methods
are fallible and may return an
Err
value for any reason.v0.3.4
Compare Source
Added
error::DifferentVariant
andError::DifferentVariant
impl From<Component> for FormatItem<'_>
impl TryFrom<FormatItem<'_>> for Component
impl<'a> From<&'a [FormatItem<'_>]> for FormatItem<'a>
impl<'a> TryFrom<FormatItem<'a>> for &[FormatItem<'a>]
impl PartialEq<Component> for FormatItem<'_>
impl PartialEq<FormatItem<'_>> for Component
impl PartialEq<&[FormatItem<'_>]> for FormatItem<'_>
impl PartialEq<FormatItem<'_>> for &[FormatItem<'_>]
impl TryFrom<Error> for error::TryFromParsed
impl TryFrom<Error> for error::Parse
impl TryFrom<Error> for error::ParseFromDescription
impl TryFrom<Error> for error::InvalidFormatDescription
impl TryFrom<Error> for error::IndeterminateOffset
impl TryFrom<Error> for error::Format
impl TryFrom<Error> for error::ConversionRange
impl TryFrom<Error> for error::ComponentRange
impl TryFrom<error::TryFromParsed> for error::ComponentRange
impl TryFrom<error::Parse> for error::TryFromParsed
impl TryFrom<error::Parse> for error::ParseFromDescription
impl TryFrom<error::Format> for std::io::Error
impl Sum for Duration
impl Sum<&Duration> for Duration
const fn default()
has been added to all modifiers that arestruct
s. These methods exist topermit construction in
const
contexts and may be removed (without being considered a breakingchange) once
impl const Default
is 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
UtcOffset
component now indicates the error comes from the offset.v0.3.3
Compare Source
# Fixed
FormatItem
can be used as part of an import path. See #675 for details.v0.3.2
Compare Source
Added
Date
has been added. BothDate
andOption<Date>
are four bytes.Second::per(Day)
, which returnsthe number of seconds in one day. See the types in the [
time::convert
module][time::convert module] for moreinformation.
Changed
--cfg unsound_local_offset
has been removed.#![feature(no_coverage)]
was previously used internally for code coverage. It is no longer used,so it has been removed.
modifier::OffsetHour
has been changed. This was unintentionally changed inv0.3.17 and went unnoticed until now. The sign is now only present if needed by default, as was
the case previously. This does not affect any situation where
format_description!
orformat_description::parse
is used.Fixed
std::time::Duration
to/from anOffsetDateTime
will not result ininteger overflow internally. It will still panic if the result is out of range.
v0.3.1
Compare Source
Fixed
This includes the update to the
format_description!
macro, which was supposed to be included in0.3.18.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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 Mend Renovate. View repository job log here.