Added fix for 'Mir egal ob die lokalzeit richtig is'
This commit is contained in:
@ -49,7 +49,7 @@ public:
|
||||
#ifdef CONFIG_ESPCHRONO_SUPPORT_DEFAULT_TIMEZONE
|
||||
return fmt::format("local: {}", espchrono::toString(espchrono::toDateTime(espchrono::local_clock::now())));
|
||||
#else // Mir egal ob die lokalzeit richtig is
|
||||
return fmt::format("local: {}", espchrono::toString(espchrono::toDateTime(espchrono::utc_clock::now() + configs.timezoneOffset.value)));
|
||||
return fmt::format("local: {}", espchrono::toString(espchrono::toDateTime(espchrono::utc_clock::now() + configs.timezoneOffset.value())));
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
@ -277,7 +277,7 @@ std::string local_clock_string()
|
||||
#ifdef CONFIG_ESPCHRONO_SUPPORT_DEFAULT_TIMEZONE
|
||||
const auto now = espchrono::local_clock::now();
|
||||
#else // mir egal ob die lokalzeit richtig is
|
||||
const auto now = espchrono::utc_clock::now() + configs.timezoneOffset.value;
|
||||
const auto now = espchrono::utc_clock::now() + configs.timezoneOffset.value();
|
||||
#endif
|
||||
const auto dt = espchrono::toDateTime(now);
|
||||
return fmt::format("{:02d}:{:02d}:{:02d}", dt.hour, dt.minute, dt.second);
|
||||
|
Reference in New Issue
Block a user