Opened 17 years ago

Closed 17 years ago

#2621 closed patch (fixed)

Perl bindings - leading zero on 24 hour hour in Program.pm

Reported by: sphery <mtdean@…> Owned by: xris
Priority: minor Milestone: unknown
Component: perl / nuvexport Version: 0.20
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The use of the localtime function (which returns elements as ints), which is new since formatting was moved to the perl bindings, means that in addition to conditionally (<10) prepending a leading zero to the 12-hour hour (which previously was converted to an int), we now need to prepend a leading zero to the 24-hour hour (which was previously retrieved as a string from the query).

The attached patch does the comparison and prepends a zero, as required. I changed the value after using the int value for creation of the 12-hour hour (rather than convert the 24-hour value to string and back to int for the 12-hour comparison/assignment, which would require converting back to string, again, for 9 of 12 possible values).

Attachments (1)

mythtv-perl_bindings-Program_24_hr_leading_zero.patch (729 bytes) - added by sphery <mtdean@…> 17 years ago.

Download all attachments as: .zip

Change History (3)

Changed 17 years ago by sphery <mtdean@…>

comment:1 Changed 17 years ago by xris

Component: mythtvperl / nuvexport
Owner: changed from Isaac Richards to xris

comment:2 Changed 17 years ago by xris

Resolution: fixed
Status: newclosed

(In [11779]) Apply patch to close #2621: fixes leading zero display for 24-hour hour field

Note: See TracTickets for help on using tickets.