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. /// Set the time zone.
void set_timezone(const std::string &tz) { this->timezone_ = tz; } 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. /// Get the time zone currently in use.
std::string get_timezone() { return this->timezone_; } std::string get_timezone() { return this->timezone_; }
@ -37,8 +40,6 @@ class RealTimeClock : public PollingComponent {
void call_setup() override; void call_setup() override;
void apply_timezone() { this->apply_timezone_(); }
void add_on_time_sync_callback(std::function<void()> callback) { void add_on_time_sync_callback(std::function<void()> callback) {
this->time_sync_callback_.add(std::move(callback)); this->time_sync_callback_.add(std::move(callback));
}; };