+ const char *fmt = formatTestFormats[n].format;
+
+ // skip the check with %p for those locales which have empty AM/PM strings:
+ // for those locales it's impossible to pass the test with %p...
+ wxString am, pm;
+ wxDateTime::GetAmPmStrings(&am, &pm);
+ if (am.empty() && pm.empty() && wxStrstr(fmt, "%p") != NULL)
+ continue;
+
+ // what can we recover?
+ CompareKind kind = formatTestFormats[n].compareKind;
+
+ // When using a different time zone we must perform a time zone
+ // conversion below which doesn't always work correctly, check
+ // for the cases when it doesn't.
+ if ( !isLocalTz )
+ {
+ // DST computation doesn't work correctly for dates above
+ // 2038 currently on the systems with 32 bit time_t.
+ if ( dt.GetYear() >= 2038 )
+ continue;
+
+ // We can't compare just dates nor just times when doing TZ
+ // conversion as both are affected by the DST: for the
+ // dates, the DST can switch midnight to 23:00 of the
+ // previous day while for the times DST can be different
+ // for the original date and today.
+ if ( kind == CompareDate || kind == CompareTime )
+ continue;
+ }