[commit: packages/time] master: FIX #1486: timezone offset has the wrong sign on Windows (8e487ba)

git at git.haskell.org git at git.haskell.org
Sun Dec 20 07:51:34 UTC 2015


Repository : ssh://git@git.haskell.org/time

On branch  : master
Link       : http://git.haskell.org/packages/time.git/commitdiff/8e487bae5f6507e15d8b142683b0ba1c4eefa223

>---------------------------------------------------------------

commit 8e487bae5f6507e15d8b142683b0ba1c4eefa223
Author: Simon Marlow <simonmar at microsoft.com>
Date:   Tue Jul 10 01:12:36 2007 -0700

    FIX #1486: timezone offset has the wrong sign on Windows
    
    Fix submitted by Olivier Boudry, thanks!
    
    darcs-hash:20070710081236-760e2-6581eff1e91b2207190b15ec6143f0eb26442178


>---------------------------------------------------------------

8e487bae5f6507e15d8b142683b0ba1c4eefa223
 cbits/HsTime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cbits/HsTime.c b/cbits/HsTime.c
index 58b7d06..dacb1d4 100644
--- a/cbits/HsTime.c
+++ b/cbits/HsTime.c
@@ -22,7 +22,7 @@ long int get_current_timezone_seconds (time_t t,int* pdst,char const* * pname)
 		// implemented as part of localtime() in the CRT.  This is_dst
 		// flag is all we need here.
 		*pname = dst ? _tzname[1] : _tzname[0];
-		return dst ? _timezone - 3600 : _timezone;
+		return - (dst ? _timezone - 3600 : _timezone);
 #else
 # if HAVE_TZNAME
 		*pname = *tzname;



More information about the ghc-commits mailing list