Issues from blog
JChristensen opened this issue · 0 comments
JChristensen commented
Found a couple of issues with the Timezone library:
- In
calcTimeChanges()
- The following doesn't look right.
m_dstUTC = m_dstLoc - m_std.offset * SECS_PER_MIN;
m_stdUTC = m_stdLoc - m_dst.offset * SECS_PER_MIN;
- Should it be:
m_dstUTC = m_dstLoc - m_dst.offset * SECS_PER_MIN;
m_stdUTC = m_stdLoc - m_std.offset * SECS_PER_MIN;
- Initialization of the following member variables missing in the constructor.
m_dstUTC = 0;
m_stdUTC = 0;
m_dstLoc = 0;
m_stdLoc = 0;
- The
new
operator may not necessarily zeros the member variables (implementation dependent). This causes theutcIsDST()
method to return false, resulting in the daylight saving not working properly.