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 {
31
31
if date. is_none ( ) {
32
32
log:: error!( "error reading commit date: {hash_short} - timestamp: {}" , c. time) ;
33
33
}
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
+ )
38
40
} ;
39
41
40
42
let author = c. author ;
Original file line number Diff line number Diff line change @@ -28,11 +28,13 @@ macro_rules! try_or_popup {
28
28
29
29
/// helper func to convert unix time since epoch to formated time string in local timezone
30
30
pub 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
+ ) ;
36
38
37
39
time. format ( if short {
38
40
"%Y-%m-%d"
You can’t perform that action at this time.
0 commit comments