From 4bdfaa384be0f75dc29b73885a9dd192a9e8ac70 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 1 Jun 2008 14:37:26 +0000 Subject: [PATCH] fix wxDateTime::ParseRfc822Date() to handle missing seconds (ticket #1341) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/common/datetime.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index e6d48f2285..5c14a81e9a 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -97,6 +97,7 @@ All: - Fixed bug with parsing negative time zones in wxDateTime::ParseRfc822Date(). - Initialize current line in wxTextBuffer ctor (Suzuki Masahiro). - Improved performance of XML parsing (Francesco Montorsi). +- Fix wxDateTime::ParseRfc822Date() to handle missing seconds (Joe Nader). All (GUI): diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 109e3e712b..72cc38b626 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -2879,8 +2879,9 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date) min = (wxDateTime_t)(min + *p++ - _T('0')); wxDateTime_t sec = 0; - if ( *p++ == _T(':') ) + if ( *p == _T(':') ) { + p++; if ( !wxIsdigit(*p) ) { return (wxChar *)NULL;