Opened 7 years ago

Last modified 3 years ago

#4418 new defect

[PATCH] Gametime overlay shows wrong time, too small size

Reported by: elexis Owned by:
Priority: Should Have Milestone: Backlog
Component: UI – In-game Keywords: patch, simple
Cc: Imarok Patch:

Description

Bug 1) When exceeding 1h gametime, it displays 2h gametime (en-US locale, CET), likely introduced with the timezone change in r18725. All other uses of timeToString and FormatMillisecondsIntoDateString seem to be correct (as in receiving a Unix timestamp instead of a time without date). We should probably have 2 functions (one adapting the timezone, one that doesn't).

Bug 2) When exceeding 1h gametime and having a non-integer gamespeed (0.1x, ..., 1.5x) the counter GUI object is too small and it wraps over. It should instead use the maxTextWidth logic from displayGamestateNotifications (move it to a helper function). To be fixed in functions_global_object.js (those GUI objects being defined in global.xml).

Attachments (3)

4418_duration_l18n.patch (5.9 KB ) - added by Imarok 7 years ago.
Fixes 1) by distinguishing between the localization of a time and the localitzation of a duration
4418_duration_l18n_v2.patch (5.9 KB ) - added by Imarok 7 years ago.
change isDuration to localTimezone
4418_duration_l18n_v3.patch (6.3 KB ) - added by Imarok 7 years ago.
Don't use Duration

Download all attachments as: .zip

Change History (14)

comment:1 by Imarok, 7 years ago

1) also occurs in "Time elapsed: " in the summary and in the replay duration shown in the replay menu Edit: afaics all uses of timeToString are wrong, because they are all used for a duration and not for a time (date without month, day and year)

Last edited 7 years ago by Imarok (previous) (diff)

by Imarok, 7 years ago

Attachment: 4418_duration_l18n.patch added

Fixes 1) by distinguishing between the localization of a time and the localitzation of a duration

comment:2 by Imarok, 7 years ago

Keywords: patch review added
Summary: Gametime overlay shows wrong time, too small size[PATCH] Gametime overlay shows wrong time, too small size

comment:3 by Imarok, 7 years ago

Milestone: BacklogAlpha 22
Priority: Should HaveMust Have

by Imarok, 7 years ago

Attachment: 4418_duration_l18n_v2.patch added

change isDuration to localTimezone

comment:4 by elexis, 7 years ago

FormatMillisecondsIntoDateStringGMT and FormatMillisecondsIntoDateStringLocal?

by Imarok, 7 years ago

Attachment: 4418_duration_l18n_v3.patch added

Don't use Duration

comment:5 by elexis, 7 years ago

  • Is the date really "converted to GMT"? Isn't the timestamp implied to be GMT?
  • Prefered the naming convention above. If we have two variants, then one shouldn't have to find the name of the other variant to find out what the default one is doing.

comment:6 by elexis, 7 years ago

Keywords: simple review removed

comment:7 by Imarok, 7 years ago

In 19180:

Durations over 1 hour aren't displayed correctly

Reviewed by: elexis

Differential Revision: https://code.wildfiregames.com/D44

refs #4418, #3350

comment:8 by elexis, 7 years ago

Keywords: simple added
Milestone: Alpha 22Backlog
Priority: Must HaveShould Have

comment:9 by Imarok, 5 years ago

Component: UI & SimulationIn-game UI

Move tickets to In-game UI as UI & Simulation got some sub components.

comment:10 by Silier, 3 years ago

Keywords: simple removed
severity: simple

comment:11 by Silier, 3 years ago

Keywords: simple added
Note: See TracTickets for help on using tickets.