- if(timeOnly && hasZone && fmt->getTimeZone().inDaylightTime(d[0], status) && ! failure(status, "TimeZone::inDST()")) {
- maxDmatch = 3;
- maxSmatch = 2;
+ if(timeOnly && hasZoneDisplayName) {
+ int32_t startRaw, startDst;
+ fmt->getTimeZone().getOffset(d[0], FALSE, startRaw, startDst, status);
+ failure(status, "TimeZone::getOffset");
+ // if the start offset is greater than the offset on Jan 1, 1970
+ // in PST, then need one more round trip. There are two cases
+ // fall into this category. The start date is 1) DST or
+ // 2) LMT (GMT-07:52:58).
+ if (startRaw + startDst > -28800000) {
+ maxDmatch = 3;
+ maxSmatch = 2;
+ }