Opened 5 years ago

Closed 5 years ago

#15204 closed defect (fixed)

Missing parse format in ParseTime

Reported by: eurecam-benjamin Owned by:
Priority: normal Milestone:
Component: base Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: yes


wxwidgets 2.8 tries these formats for parsing time:
1 - "%I:%M:%S %p"
2 - "%H:%M:%S"
3 - "%I:%M %p"
4 - "%H:%M"
5 - "%I %p"
6 - "%H"
7 - "%X"

Formats 5 and 6 are missing in wxWidgets 2.9.

My application relies on "%H" format and the lake of it causes an error.
It could be easily bypassed, but I think this it an unexpected behavior.

Attachments (1)

datetimefmt.patch download (688 bytes) - added by eurecam-benjamin 5 years ago.
Add missing format in ParseTime

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by eurecam-benjamin

Add missing format in ParseTime

comment:1 Changed 5 years ago by vadz

  • Status changed from new to confirmed

Thanks for noticing this! Will apply soon.

comment:2 Changed 5 years ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [73988]) Restore ability to parse hours only with wxDateTime::ParseTime().

This was accidentally removed in r51059, but worked in 2.8 and so should
continue to work.

Also add a unit test to ensure that this doesn't get broken again in the

Closes #15204.

Note: See TracTickets for help on using tickets.