Commit 154e2026 authored by Satoru Takeuchi's avatar Satoru Takeuchi Committed by Elliott Hughes
Browse files

libc: Fix mktime returns an uncorrect time in empty TZ case

The mktime API returned an uncorrect time when TZ is set as empty.
A timezone UTC/GMT+0 should be implied in the empty case. However
mktime keeps previous information about timezone. If mktime was called
with a timezone which has DST before, the "defaulttype" member of
"state" structure wouldn't be 0. Then it would be used next time,
even though UTC/GMT+0 doesn't have DST.

Added initialization of the "defaulttype" in the empty TZ case.

Change-Id: Ic480c63c548c05444134e0aefb30a7b380e3f40b
parent 38569312
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment