File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,12 @@ impl From<CommitInfo> for LogEntry {
3131 if date. is_none ( ) {
3232 log:: error!( "error reading commit date: {hash_short} - timestamp: {}" , c. time) ;
3333 }
34- DateTime :: < Local > :: from ( DateTime :: < Utc > :: from_utc (
35- date. unwrap_or_default ( ) ,
36- Utc ,
37- ) )
34+ DateTime :: < Local > :: from (
35+ DateTime :: < Utc > :: from_naive_utc_and_offset (
36+ date. unwrap_or_default ( ) ,
37+ Utc ,
38+ ) ,
39+ )
3840 } ;
3941
4042 let author = c. author ;
Original file line number Diff line number Diff line change @@ -28,11 +28,13 @@ macro_rules! try_or_popup {
2828
2929/// helper func to convert unix time since epoch to formated time string in local timezone
3030pub fn time_to_string ( secs : i64 , short : bool ) -> String {
31- let time = DateTime :: < Local > :: from ( DateTime :: < Utc > :: from_utc (
32- NaiveDateTime :: from_timestamp_opt ( secs, 0 )
33- . unwrap_or_default ( ) ,
34- Utc ,
35- ) ) ;
31+ let time = DateTime :: < Local > :: from (
32+ DateTime :: < Utc > :: from_naive_utc_and_offset (
33+ NaiveDateTime :: from_timestamp_opt ( secs, 0 )
34+ . unwrap_or_default ( ) ,
35+ Utc ,
36+ ) ,
37+ ) ;
3638
3739 time. format ( if short {
3840 "%Y-%m-%d"
You can’t perform that action at this time.
0 commit comments