Fixed an issue where the wrong time was generated when DST happens.