mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 08:56:29 +03:00
fix gm2local offset calculations
This commit is contained in:
committed by
holger krekel
parent
99ba2fb358
commit
37ecfa6b67
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user