From 99ba2fb358a8b32623743512af4d99a3affdd2d0 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sat, 9 Nov 2019 19:04:23 +0100 Subject: [PATCH] let dc_timestamp_to_str() print the local time, not UTC times. the function is used for outputs directly shown to the user, eg. dc_get_msg_info() --- src/dc_tools.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dc_tools.rs b/src/dc_tools.rs index 35df3fe2c..852f00a18 100644 --- a/src/dc_tools.rs +++ b/src/dc_tools.rs @@ -154,7 +154,7 @@ pub(crate) fn dc_timestamp_from_date(date_time: *mut mailimf_date_time) -> i64 { ******************************************************************************/ pub fn dc_timestamp_to_str(wanted: i64) -> String { - let ts = chrono::Utc.timestamp(wanted, 0); + let ts = Local.timestamp(wanted, 0); ts.format("%Y.%m.%d %H:%M:%S").to_string() }