QUtcTimeZonePrivate::data - skip spurious invalid start state.

Most fields were over-written after setting invalid.  The two that
weren't (not used by QUtcTimeZonePrivate) should be (if only for
uniformity with other QTimeZonePrivate variants), so set them to
sensible values.

Change-Id: I824ca0108d5b6bc322f76a0d1683342f789523b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Edward Welbourne 2016-06-14 12:28:02 +02:00
parent d4302ec693
commit 92ccb76550
1 changed files with 3 additions and 2 deletions

View File

@ -650,10 +650,11 @@ QTimeZonePrivate *QUtcTimeZonePrivate::clone()
QTimeZonePrivate::Data QUtcTimeZonePrivate::data(qint64 forMSecsSinceEpoch) const
{
Data d = invalidData();
Data d;
d.abbreviation = m_abbreviation;
d.atMSecsSinceEpoch = forMSecsSinceEpoch;
d.offsetFromUtc = m_offsetFromUtc;
d.standardTimeOffset = d.offsetFromUtc = m_offsetFromUtc;
d.daylightTimeOffset = 0;
return d;
}