mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 08:39:19 +02:00
refactor: sonar c++20 changes (#185)
This commit is contained in:
@@ -1479,11 +1479,8 @@ bool eu07_application::init_network()
|
||||
// TODO: sort out this timezone mess
|
||||
std::time_t utc_now = std::time(nullptr);
|
||||
|
||||
tm tm_local, tm_utc;
|
||||
tm *tmp = std::localtime(&utc_now);
|
||||
memcpy(&tm_local, tmp, sizeof(tm));
|
||||
tmp = std::gmtime(&utc_now);
|
||||
memcpy(&tm_utc, tmp, sizeof(tm));
|
||||
std::tm const tm_local = local_tm(utc_now);
|
||||
std::tm const tm_utc = utc_tm(utc_now);
|
||||
|
||||
int64_t offset = tm_local.tm_hour * 3600 + tm_local.tm_min * 60 + tm_local.tm_sec - (tm_utc.tm_hour * 3600 + tm_utc.tm_min * 60 + tm_utc.tm_sec);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user