Fix ParseDateTime to handle default 'T' separator (PR #22999)

13 views
Skip to first unread message

Blake-Madden

unread,
Nov 27, 2022, 8:49:38 AM11/27/22
to wx-...@googlegroups.com, Subscribed

ParseDateTime currently fails if there is a 'T' separator in front of time component. FormatISOCombined() uses this separator as the default, so wxDateTime can't parse its own formatted results by default. Example

wxDateTime dt;
wxASSERT(dt.ParseDateTime("1979-10-31 13:37:09"));
wxASSERT(dt.IsValid());

wxDateTime otherDt;
// OK
wxASSERT(otherDt.ParseDateTime(dt.FormatISOCombined(' ')));
// Fails using the defaults (and, according to the help, the standard format)
wxASSERT(otherDt.ParseDateTime(dt.FormatISOCombined()));

You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/22999

Commit Summary

  • 616e5f4 Fix ParseDateTime to handle 'T' separator

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22999@github.com>

Blake-Madden

unread,
Nov 27, 2022, 8:53:38 AM11/27/22
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22999/push/11798868995@github.com>

Lauri Nurmi

unread,
Nov 27, 2022, 10:03:28 AM11/27/22
to wx-...@googlegroups.com, Subscribed

A unit test for this should be added to tests/datetime/datetimetest.cpp.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22999/c1328263788@github.com>

Blake-Madden

unread,
Nov 27, 2022, 10:09:25 AM11/27/22
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22999/push/11799238834@github.com>

VZ

unread,
Nov 27, 2022, 10:43:37 AM11/27/22
to wx-...@googlegroups.com, Subscribed

Looks good, thanks! Will merge soon.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22999/c1328272920@github.com>

VZ

unread,
Nov 29, 2022, 8:24:10 PM11/29/22
to wx-...@googlegroups.com, Subscribed

Closed #22999 via fc9e188.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22999/issue_event/7917774857@github.com>

Reply all
Reply to author
Forward
0 new messages