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"
29 const int OLD_START_SUMMER_HOUR = 2;
30 const int OLD_STOP_SUMMER_HOUR = 3;
31 const int NEW_SUMMER_HOUR = 1;
38 for(
int d = max_days; d >= dt.
day; d--) {
41 if(dt.
hour >= OLD_START_SUMMER_HOUR)
51 for(
int d = max_days; d >= dt.
day; d--) {
54 if(dt.
hour >= OLD_STOP_SUMMER_HOUR)
69 for(
int d = max_days; d >= dt.
day; d--) {
72 if(dt.
hour >= (NEW_SUMMER_HOUR + 2))
82 for(
int d = max_days; d >= dt.
day; d--) {
85 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.
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.