Fix a bug that daylight saving time is ignored

Redmine: fixes #2546