File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -250,12 +250,12 @@ pub fn time_mod(
250250 time_format : & str ,
251251) -> Result < ( ) , Box < dyn std:: error:: Error > > {
252252 if e. symlink_metadata ( ) ?. modified ( ) . is_ok ( ) {
253- let mtime = FileTime :: from_last_modification_time ( & e. symlink_metadata ( ) . unwrap ( ) ) ;
254- let d = NaiveDateTime :: from_timestamp ( mtime. seconds ( ) as i64 , 0 ) ;
253+ let timestamp = fs:: symlink_metadata ( e) ?;
254+ let naive = NaiveDateTime :: from_timestamp ( FileTime :: from_last_modification_time ( & timestamp) . seconds ( ) as i64 , 0 ) ;
255+ let datetime: DateTime < Local > = DateTime :: from_utc ( naive, * Local :: now ( ) . offset ( ) ) ;
255256 if !Cli :: from_args ( ) . colors_on {
256257 print ! ( "{}" , color:: Fg ( color:: LightRed ) ) ;
257258 }
258- let datetime = d;
259259 print ! ( "{} " , datetime. format( time_format) ) ;
260260 }
261261 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments