ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
time_utc.h File Reference

Go to the source code of this file.

Namespaces

namespace  esphome
 
namespace  esphome::internal
 RP2040 wakeable delay uses file-scope state (alarm callback + flag) — defined in wake_rp2.cpp.
 

Functions

bool esphome::internal::is_leap_year (int year)
 Check if a year is a leap year.
 
int esphome::internal::days_in_month (int year, int month)
 Get the number of days in a month (1-12)
 
int esphome::internal::days_before_month (int year, int month)
 Days in the year before the first of a month (1-12)
 
constexpr int esphome::internal::days_to_weekday (int32_t days)
 Day of the week (0 = Sunday) of a day counted from the epoch, which may be negative.
 
int32_t esphome::internal::days_to_year_start (int year)
 Days from the epoch (Jan 1 1970) to Jan 1 of the given year.
 
bool esphome::internal::epoch_in_range (time_t epoch)
 Whether a UTC epoch is in the years 0 to 65535, which the epoch functions below take without checking.
 
int esphome::internal::epoch_to_year (time_t epoch)
 Get the year of a UTC epoch.
 
void esphome::internal::epoch_to_tm_utc (time_t epoch, struct tm *out_tm)
 Convert epoch to year/month/day/hour/min/sec (UTC)