fix gm2local offset calculations

This commit is contained in:
B. Petersen
2019-11-09 19:05:21 +01:00
committed by holger krekel
parent 99ba2fb358
commit 37ecfa6b67

View File

@@ -159,8 +159,10 @@ pub fn dc_timestamp_to_str(wanted: i64) -> String {
}
pub(crate) fn dc_gm2local_offset() -> i64 {
/* returns the offset that must be _added_ to an UTC/GMT-time to create the localtime.
the function may return negative values. */
let lt = Local::now();
((lt.offset().local_minus_utc() / (60 * 60)) * 100) as i64
lt.offset().local_minus_utc() as i64
}
/* timesmearing */