2#ifndef _TIME_SHIELD_TIME_ZONE_CONVERSIONS_HPP_INCLUDED
3#define _TIME_SHIELD_TIME_ZONE_CONVERSIONS_HPP_INCLUDED
19 const int OLD_START_SUMMER_HOUR = 2;
20 const int OLD_STOP_SUMMER_HOUR = 3;
21 const int NEW_SUMMER_HOUR = 1;
27 for(
int d = max_days; d >= dt.
day; --d) {
30 if(dt.
hour >= OLD_START_SUMMER_HOUR)
39 for(
int d = max_days; d >= dt.
day; --d) {
42 if(dt.
hour >= OLD_STOP_SUMMER_HOUR)
56 for(
int d = max_days; d >= dt.
day; --d) {
59 if(dt.
hour >= (NEW_SUMMER_HOUR + 2))
68 for(
int d = max_days; d >= dt.
day; --d) {
71 if(dt.
hour >= (NEW_SUMMER_HOUR + 1))
constexpr int64_t SEC_PER_HOUR
Seconds per hour.
constexpr const T1 num_days_in_month(T2 year, T3 month) noexcept
Get the number of days in a month.
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 day_of_week_date(T2 year, T3 month, T3 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
Type for representing timestamps in seconds.
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.