Update real_time_clock.h

This commit is contained in:
Rebbe Pod 2024-08-28 22:02:34 -04:00 committed by GitHub
parent bacec4fb37
commit 3a61204a17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,6 +23,9 @@ class RealTimeClock : public PollingComponent {
/// Set the time zone.
void set_timezone(const std::string &tz) { this->timezone_ = tz; }
// Apply the time zone.
void apply_timezone() { this->apply_timezone_(); }
/// Get the time zone currently in use.
std::string get_timezone() { return this->timezone_; }
@ -36,8 +39,6 @@ class RealTimeClock : public PollingComponent {
time_t timestamp_now() { return ::time(nullptr); }
void call_setup() override;
void apply_timezone() { this->apply_timezone_(); }
void add_on_time_sync_callback(std::function<void()> callback) {
this->time_sync_callback_.add(std::move(callback));