Do not use date.c:tm_to_time_t() from compat/mingw.c
authorJohannes Sixt <j6t@kdbg.org>
Fri, 15 Jan 2010 20:12:21 +0000 (21:12 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 17 Jan 2010 02:16:13 +0000 (18:16 -0800)
commita6d15bc33529f923b205930d0a58fe6226570dc1
treef2519cff4c69e62d9818c692318b6de45627d2f9
parent44626dc7d562d23b54d969bb73ddeda12d5602e9
Do not use date.c:tm_to_time_t() from compat/mingw.c

To implement gettimeofday(), a broken-down UTC time was requested from the
system using GetSystemTime(), then tm_to_time_t() was used to convert it
to a time_t because it does not look at the current timezone, which
mktime() would do.

Use GetSystemTimeAsFileTime() and a different conversion path to avoid this
back-reference from the compatibility layer to the generic code.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c