Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#2938 closed defect (fixed)

[PATCH]Add the hours to the time display

Reported by: Itms Owned by: leper
Priority: Must Have Milestone: Alpha 18
Component: UI & Simulation Keywords: simple patch
Cc: Patch:

Description

As reported on the forums, the time display in the game is not properly set up to display the hours, this should be fixed.

Attachments (1)

hoursDisplay.patch (2.3 KB ) - added by Justin 9 years ago.
Adds hours display to the game time

Download all attachments as: .zip

Change History (8)

comment:1 by mimo, 9 years ago

I think this is linked to #2894: the display of the ingame time should be made consistent with the real time display.

comment:2 by Justin, 9 years ago

I believe this bug should read a little differently. I have been looking into fixing it, and the hours do display, however the hour value is incorrect. For example after one hour the hour shows 20.

Version 0, edited 9 years ago by Justin (next)

comment:3 by Justin, 9 years ago

Milestone: BacklogAlpha 18
Summary: Add the hours to the time display[PATCH]Add the hours to the time display

comment:4 by Justin, 9 years ago

Keywords: review patch added

by Justin, 9 years ago

Attachment: hoursDisplay.patch added

Adds hours display to the game time

comment:5 by leper, 9 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 16037:

Explictly use GMT when displaying a localized time that is not a date. Patch by lafferjm. Fixes #2938.

Also make some parameters const references.

comment:6 by leper, 9 years ago

Keywords: review removed

Thanks for the patch.

I made some slight changes to your patch:

  • Tabs, not spaces (See Coding_Conventions).
  • Used getGMT() instead of explicitly constructing that every time.
  • Used std::string as using a CStr just to convert it back to an std::string is useless.
  • Used %hs instead of %s as that causes issues on at least Windows (See Coding_Conventions).

comment:7 by elexis, 8 years ago

In 18725:

Use the local timezone when localizing UTC timestamps. Patch by Imarok, fixes #3350, refs #2938.
Thus show the correct time in the lobby, savegame and replay menu.

Note: See TracTickets for help on using tickets.