The Geoscape clock is a bit cursed - as you can see from the video below, the clock uses the 'localized time' (i.e. the timezone wherever the skyranger happens to be located on the world-map) when it is landed. However, when flying, the timezone reverts back to UTC. This is a bit jarring since it looks like we're going back (or forward) through time every time we take off.
https://github.com/user-attachments/assets/24d96080-bfe5-4546-91eb-930880a79ae8
The code which handles this is in UIEventQueue::RefreshDateTime() - specifically this section:
//Don't adjust to local time while the base is in flight as it looks nicer for the clock to update smoothly
XComHQ = XComGameState_HeadquartersXCom(`XCOMHISTORY.GetSingleGameStateObjectForClass(class'XComGameState_HeadquartersXCom'));
if(!XComHQ.Flying)
{
class'X2StrategyGameRulesetDataStructures'.static.GetLocalizedTime(XComHQ.Get2DLocation(), dateTimeData);
}
class'X2StrategyGameRulesetDataStructures'.static.GetTimeStringSeparated(dateTimeData, Hours, Minutes, Suffix);
We can take advantage of this by using an else statement to give us options for the time display when flying:
- Timezone stays at the Source skyranger location and then updates at the destination (like this):
https://github.com/user-attachments/assets/cb8b727b-bf8d-4e67-8077-c5a8f0c3ad45
OR
- Timezone updates immediately to the destination timezone at the start of the flight and nothing happens upon landing:
https://github.com/user-attachments/assets/cd5378d5-920b-47f7-83d6-6faacd676ccb
OR
- The timezone never updates and we just use the player's default timezone at all times.
I will propose a PR that allows mods to adjust the behaviour using simple bools in CHHelpers
The Geoscape clock is a bit cursed - as you can see from the video below, the clock uses the 'localized time' (i.e. the timezone wherever the skyranger happens to be located on the world-map) when it is landed. However, when flying, the timezone reverts back to UTC. This is a bit jarring since it looks like we're going back (or forward) through time every time we take off.
https://github.com/user-attachments/assets/24d96080-bfe5-4546-91eb-930880a79ae8
The code which handles this is in UIEventQueue::RefreshDateTime() - specifically this section:
We can take advantage of this by using an else statement to give us options for the time display when flying:
https://github.com/user-attachments/assets/cb8b727b-bf8d-4e67-8077-c5a8f0c3ad45
OR
https://github.com/user-attachments/assets/cd5378d5-920b-47f7-83d6-6faacd676ccb
OR
I will propose a PR that allows mods to adjust the behaviour using simple bools in CHHelpers