[GHC] #1486: utcToLocalTime converting in the wrong direction on Windows

GHC trac at galois.com
Mon Jul 9 09:23:07 EDT 2007


#1486: utcToLocalTime converting in the wrong direction on Windows
----------------------------------+-----------------------------------------
    Reporter:  Olivier Boudry     |        Owner:         
        Type:  bug                |       Status:  new    
    Priority:  normal             |    Milestone:  Not GHC
   Component:  libraries (other)  |      Version:  6.6.1  
    Severity:  normal             |   Resolution:         
    Keywords:                     |   Difficulty:  Unknown
          Os:  Windows            |     Testcase:         
Architecture:  x86                |  
----------------------------------+-----------------------------------------
Comment (by Olivier Boudry):

 I think the problem is that:

 tm_gmtoff is secs EAST of UTC
 _timezone is secs WEST of UTC.

 The have reverse meaning so to get it working properly you should negate
 the Win32 result.

 return - (dst ? _timezone - 3600 : _timezone);

 I played with timezones on both Unix and Win32 and the timezone offset in
 minutes was always the reverse on Win32 (240/-240, 120/-120), etc...

 I didn't managed to build just the time library on my PC. Tried with MinGW
 but it didn't worked so I couldn't test the proposed fix.

 Cheers,

 Olivier.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1486>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


More information about the Glasgow-haskell-bugs mailing list