File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -42,15 +42,16 @@ impl Time {
4242
4343 fn format_inner ( & self , format : Format ) -> String {
4444 match format {
45- Format :: Custom ( CustomFormat ( format) ) => self . to_time ( ) . strftime ( format) . to_string ( ) ,
45+ Format :: Custom ( CustomFormat ( format) ) => self . to_zoned ( ) . strftime ( format) . to_string ( ) ,
4646 Format :: Unix => self . seconds . to_string ( ) ,
4747 Format :: Raw => self . to_string ( ) ,
4848 }
4949 }
5050}
5151
5252impl Time {
53- fn to_time ( self ) -> jiff:: Zoned {
53+ /// Produce a `Zoned` time for complex time computations and limitless formatting.
54+ pub fn to_zoned ( self ) -> jiff:: Zoned {
5455 let offset = jiff:: tz:: Offset :: from_seconds ( self . offset ) . expect ( "valid offset" ) ;
5556 jiff:: Timestamp :: from_second ( self . seconds )
5657 . expect ( "always valid unix time" )
You can’t perform that action at this time.
0 commit comments