2#ifndef _TIME_SHIELD_TIME_ZONE_CONVERSIONS_HPP_INCLUDED
3#define _TIME_SHIELD_TIME_ZONE_CONVERSIONS_HPP_INCLUDED
23 const int OLD_START_SUMMER_HOUR = 2;
24 const int OLD_STOP_SUMMER_HOUR = 3;
25 const int NEW_SUMMER_HOUR = 1;
31 for(
int d = max_days; d >= dt.
day; --d) {
34 if(dt.
hour >= OLD_START_SUMMER_HOUR)
43 for(
int d = max_days; d >= dt.
day; --d) {
46 if(dt.
hour >= OLD_STOP_SUMMER_HOUR)
60 for(
int d = max_days; d >= dt.
day; --d) {
63 if(dt.
hour >= (NEW_SUMMER_HOUR + 2))
72 for(
int d = max_days; d >= dt.
day; --d) {
75 if(dt.
hour >= (NEW_SUMMER_HOUR + 1))
Header for date and time structure and related functions.
constexpr int64_t SEC_PER_HOUR
Seconds per hour.
const ts_t eet_to_gmt(ts_t eet)
Convert Eastern European Time to Greenwich Mean Time.
const ts_t cet_to_gmt(ts_t cet)
Convert Central European Time to Greenwich Mean Time.
constexpr const T1 num_days_in_month(ts_t ts=time_shield::ts()) noexcept
Alias for num_days_in_month_ts function.
constexpr const T1 day_of_week_date(T2 year, T3 month, T4 day)
Get the day of the week.
T1 to_date_time(T2 ts)
Converts a timestamp to a date-time structure.
int64_t ts_t
Unix timestamp in seconds since 1970‑01‑01T00:00:00Z.
Main namespace for the Time Shield library.
Structure to represent date and time.
int hour
Hour component of time (0-23)
int64_t year
Year component of the date.
int day
Day component of the date (1-31).
int mon
Month component of the date (1-12).
Header file for time conversion functions.