7#ifndef __TIME_SHIELD_TIME_ZONE_CONVERSIONS_MQH__
8#define __TIME_SHIELD_TIME_ZONE_CONVERSIONS_MQH__
14#property copyright "Copyright 2025, NewYaroslav"
15#property link "https://github.com/NewYaroslav/time-shield-cpp"
30 const int OLD_START_SUMMER_HOUR = 2;
31 const int OLD_STOP_SUMMER_HOUR = 3;
32 const int NEW_SUMMER_HOUR = 1;
39 for(
int d = max_days; d >= dt.
day; d--) {
42 if(dt.
hour >= OLD_START_SUMMER_HOUR)
52 for(
int d = max_days; d >= dt.
day; d--) {
55 if(dt.
hour >= OLD_STOP_SUMMER_HOUR)
70 for(
int d = max_days; d >= dt.
day; d--) {
73 if(dt.
hour >= (NEW_SUMMER_HOUR + 2))
83 for(
int d = max_days; d >= dt.
day; d--) {
86 if(dt.
hour >= (NEW_SUMMER_HOUR + 1))
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.
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 with helper functions for converting between different time representations in MQL5.