Timezones are a standardized method of offsetting time across physical borders. Housing uses these timezones in their date based placeholders: %date.day/[timezone]%, %date.month/[timezone]%, %date.year/[timezone]%, %date.hour/[timezone]%, %date.minute/[timezone]%, and %date.seconds/[timezone]%.
These placeholders only support United States Timezones:
- %date.hour/PST% (Pacific Standard Time)
- %date.hour/MST% (Mountain Standard Time)
- %date.hour/CST% (Central Standard Time)
- %date.hour/EST% (Eastern Standard Time)
- %date.hour/HST% (Hawaiian Standard Time)
- %date.hour/AST% (Alaskan Standard Time)
If a date placeholder is not supplied with a timezone (%date.hour%), it will default to EST (Eastern Standard Time). This is where the Hypixel servers are located.
If a date placeholder is supplied with a timezone, but it does not match a United States Timezone from the above list (%date.hour/connorlinfoot%), it will be based on the UTC (Coordinated Universal Time).
Non-American Times
If one wishes to access the time from a timezone outside of the United States, some complicated math is necessary. Daylight saving(s) time, particularly, makes this difficult.
To begin, accessing UTC is the most important step. All timezones are based on this standard, it can be accessed by suppling a date placeholder with a timezone that does not match a United States Timezone, such as %date.hour/connorlinfoot%. Set a stat to this value using a "Change Player Stat" Action.
From here, this time stat must be incremented or decremented based on its deviation from the UTC. For example, Britain uses the timezone UTC+01:00, which means the stat must be incremented by one. If, after this incrementation, the stat is above 24, the date stat must be incremented by 1 and the hour stat decremented by 24.
In localities with partial-hour timezones, a minute stat must also be accounted for because it will be incremented by either 30 minutes or 45 minutes. If, after this incrementation, the stat is above 60, the hour stat must be incremented by 1 and the minute stat decremented by 60.
In order to account for daylight savings time, which only exists in some localities, the first step is detecting if daylight savings time is currently in action. %date.hour/EST% will only differ from UCT-05:00 during daylight savings time, and this difference can be used to detect daylight savings time.
First, set a temporary stat to a %date.hour% placeholder with a timezone that does not match a United States Timezone, such as %date.hour/connorlinfoot%, and then decrement that stat by 5, and then detect if it is equal to %date.hour/EST%. If they are equal, there is nothing to be done. If they differ, the hour stat must be incremented by one. If, after this incrementation, the stat is above 24, the date stat must be incremented by 1 and the hour stat decremented by 24.
This is all unless the timezone is at Lord Howe Island, where instead the minute stat will be incremented by 30 minutes during daylight savings time. If, after this incrementation, the stat is above 60, the hour stat must be incremented by 1 and the minute stat decremented by 60.