File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,6 @@ impl<H: HostHooks> Now<H> {
3838 ///
3939 /// Enable with the `compiled_data` and `sys` feature flags.
4040 pub fn plain_time_iso ( self , time_zone : Option < TimeZone > ) -> TemporalResult < PlainTime > {
41- self . plain_time_with_provider ( time_zone, & * TZ_PROVIDER )
41+ self . plain_time_iso_with_provider ( time_zone, & * TZ_PROVIDER )
4242 }
4343}
Original file line number Diff line number Diff line change @@ -90,10 +90,24 @@ impl<H: HostHooks> Now<H> {
9090 ///
9191 /// When `TimeZone` is `None`, the value will default to the
9292 /// system time zone or UTC if the system zone is unavailable.
93+ /// Deprecated: Use `plain_time_iso_with_provider` instead.
94+ #[ deprecated( since = "0.1.2" , note = "Use `plain_time_iso_with_provider` instead" ) ]
9395 pub fn plain_time_with_provider (
9496 self ,
9597 time_zone : Option < TimeZone > ,
9698 provider : & ( impl TimeZoneProvider + ?Sized ) ,
99+ ) -> TemporalResult < PlainTime > {
100+ self . plain_time_iso_with_provider ( time_zone, provider)
101+ }
102+
103+ /// Converts `Now` into the current system [`PlainTime`].
104+ ///
105+ /// When `TimeZone` is `None`, the value will default to the
106+ /// system time zone or UTC if the system zone is unavailable.
107+ pub fn plain_time_iso_with_provider (
108+ self ,
109+ time_zone : Option < TimeZone > ,
110+ provider : & ( impl TimeZoneProvider + ?Sized ) ,
97111 ) -> TemporalResult < PlainTime > {
98112 let iso = self . system_datetime_with_provider ( time_zone, provider) ?;
99113 Ok ( PlainTime :: new_unchecked ( iso. time ) )
You can’t perform that action at this time.
0 commit comments