Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDog86 committed Nov 2, 2024
1 parent af94b00 commit 39e24b7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
5 changes: 3 additions & 2 deletions X2WOTCCommunityHighlander/Config/XComGameData.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
;;;

[XComGame.X2StrategyGameRulesetDataStructures]
; Issue #1400 - Uncomment the next line to force 24H clock.
;bForce24hclock = true
; Issue #1400 - Uncomment to force 24h clock and/or addition of a leading zero to the hours (e.g. to display 03:45 instead of 3:45 on the geoscape)
;bForce24hClock = true
;bForce24hClockLeadingZero = true
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,7 @@ var config int START_YEAR;

// Single Line for Issue #1400
var config bool bForce24hClock;
var config bool bForce24hclockLeadingZero;
// Intro movie narrative moment
var config string IntroMovie;

Expand Down Expand Up @@ -1570,12 +1571,11 @@ static function GetTimeStringSeparated(TDateTime kDateTime, out string Hours, ou
iHour = GetHour(kDateTime);

/// HL-Docs: feature:DateAndTimeFormattingChanges; issue:1400; tags:
/// Add code to allow forcing the 24h clock independently of locale
/// Allow forcing the 24h clock independently of locale and add an option to display leading zeroes for military-style time - e.g. 03:41 instead of 3:41

// INT and ESN use the 12 hour clock for events, checked with Loc 12/15/2015. -bsteiner
if( !default.bForce24hclock && (Lang == "INT" || Lang == "ESN"))
{
// End issue #1400
{
// AM
if( iHour < 12 )
{
Expand Down Expand Up @@ -1608,7 +1608,15 @@ static function GetTimeStringSeparated(TDateTime kDateTime, out string Hours, ou
Minutes = string(GetMinute(kDateTime));
}

Hours = string(iHour);
if( default.bForce24hClockLeadingZero && GetHour(kDateTime) < 10 )
{
Hours = "0"$GetHour(kDateTime);
}
else
{
Hours = string(GetHour(kDateTime));
}
// End Issue #1400
}

static function string GetDateString(TDateTime kDateTime, optional bool bShortFormat = false)
Expand Down

0 comments on commit 39e24b7

Please sign in to comment.