Opened 10 years ago

Closed 10 years ago

#8866 closed defect (fixed)

Hour format 09:00/21:00 in mythweb

Reported by: anonymous Owned by: Nicolas Riendeau
Priority: minor Milestone: 0.24
Component: Plugin - MythWeb Version: Master Head
Severity: medium Keywords: default time format
Cc: Ticket locked: no


The hour format 09:00/21:00 in mythweb is not effective in Listings page

Change History (11)

comment:1 Changed 10 years ago by robertm

Status: newassigned

comment:2 Changed 10 years ago by robertm

Resolution: Invalid
Status: assignedclosed

Unable to reproduce, works fine for me.

comment:3 Changed 10 years ago by anonymous

My os is mandriva linux 64 bits.

To resole my problem I change the "generic_time" from %I:%M %p to %H:%M %p in the file mythweb/modules/_shared/lang/French.lang

Thanks you

comment:4 Changed 10 years ago by Kenni Lund [kenni a kelu dot dk]

Resolution: Invalid
Status: closednew

comment:5 Changed 10 years ago by Kenni Lund [kenni a kelu dot dk]

Owner: changed from Rob Smith to Nicolas Riendeau
Status: newassigned

Assigning to knight, as he will be updating the French translation within the next few weeks.

comment:6 Changed 10 years ago by Nicolas Riendeau

Keywords: default time format added
Milestone: unknown0.24
Status: assignedaccepted

I'll have to check with my colleagues who live in France what this should be set to.

(French.lang is MythWeb's translation file for France...)

From what I have just read what the reporter suggests might not fully respect France's time format.

Reporter, if you notice any other problems like this you can contact one of the French translators listed on either by email or on the website list as setting these things is under their responsibility.

(I happen to be one of those translators but that's the general rule...)


comment:7 Changed 10 years ago by Rob Smith

The date format is passed to php's date function. You can look at it's params at:

%I is "Whether or not the date is in daylight saving time" which is certainly incorrect.

Let me know if you have any problems figuring out the correct date format.

comment:8 Changed 10 years ago by Jonathan Martens <jonathan@…>

If you want to display the hours in a 24h notation, you should use %G (non-zero padded) or %H (zero padded) as suggested in comment 7.

comment:9 Changed 10 years ago by Nicolas Riendeau

kormoc, I thought it was strftime ( when the date needs to be localized...

Jonathan, that's a good point about the hour padding, I have forwarded the question to my fellow French translators to see what is most commonly used in France.

The format I found (for France) on the web is apparently good (replace the : with h) but according but, according to Gilles (a fellow French translator) it is not necessary to use it in this case.

As soon as I get Gilles' opinion on this I'll commit a fix...


comment:10 Changed 10 years ago by gillessoixantequatorze@…


I see that in the 0.22 but the modification arrived to late for 0.23.

I introduce this in the french translation files and in the french locale file

New format for the "generic_time" %H:%M

Gilles French translation team

Version 1, edited 10 years ago by Nicolas Riendeau (previous) (next) (diff)

comment:11 Changed 10 years ago by Nicolas Riendeau

Resolution: fixed
Status: acceptedclosed

This issue was resolved by ticket #8955.

The fix for this might be revisited later as the formatting is not exactly the one the French language translation team wanted to apply (namely not pad the hours with 0) but the only (somewhat undocumented) way to do this might not be portable/OS independent (only date lets one do this in a documented way and the time here is displayed using strftime)

The problem was that the time was shown in AM/PM format but it was otherwise OK (I for strftime != I for date).

As mentioned previously these kind of problems are better addressed by contacting the translators directly as we will not modify the content of a translation which is currently maintained.


PS: Gilles' signature was edited with permission to show who was actually replying to the ticket.

Note: See TracTickets for help on using tickets.