discard the time zone part of strings being parsed (generalizes the "CEST"-ignoring hack of r59682)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -739,12 +739,14 @@ void DateTimeTestCase::TestTimeFormat()
|
|||||||
}
|
}
|
||||||
else // conversion succeeded
|
else // conversion succeeded
|
||||||
{
|
{
|
||||||
// ParseFormat() should have parsed the entire string or left
|
// currently ParseFormat() doesn't support "%Z" and so is
|
||||||
// some final useless strings (e.g. with Italian locale the
|
// incapable of parsing time zone part used at the end of date
|
||||||
// 's' string for the first test date looks like
|
// representations in many (but not "C") locales, compensate
|
||||||
// "---> sab 29 mag 1976 18:30:00 CET"
|
// for it ourselves by simply consuming and ignoring it
|
||||||
// so we just need to ignore CET)
|
while ( *result && (*result >= 'A' && *result <= 'Z') )
|
||||||
CPPUNIT_ASSERT( !*result || strcmp(result, "CET") == 0 );
|
result++;
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT( !*result );
|
||||||
|
|
||||||
switch ( kind )
|
switch ( kind )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user