[commit: packages/time] format-widths, ghc, improve-leapseconds, master, posix-perf, tasty, wip/travis: Changed UTC to +0000 in default time zone in ParseTime, to avoid spurios time zone names. (16a9225)

git at git.haskell.org git at git.haskell.org
Fri Apr 21 16:47:53 UTC 2017


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

On branches: format-widths,ghc,improve-leapseconds,master,posix-perf,tasty,wip/travis
Link       : http://git.haskell.org/packages/time.git/commitdiff/16a92252a19297d9e1ec75a7b292a880f57b9587

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

commit 16a92252a19297d9e1ec75a7b292a880f57b9587
Author: bjorn <bjorn at bringert.net>
Date:   Thu Nov 16 02:52:54 2006 -0800

    Changed UTC to +0000 in default time zone in ParseTime, to avoid spurios time zone names.
    
    darcs-hash:20061116105254-6cdb2-3328529fc7d8536b6e9009295768fdc2eae7e25a


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

16a92252a19297d9e1ec75a7b292a880f57b9587
 Data/Time/LocalTime/Parse.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Data/Time/LocalTime/Parse.hs b/Data/Time/LocalTime/Parse.hs
index b3c42c7..a5420d3 100644
--- a/Data/Time/LocalTime/Parse.hs
+++ b/Data/Time/LocalTime/Parse.hs
@@ -33,7 +33,7 @@ class ParseTime t where
     -- | Builds a time value from a parsed input string.
     -- If the input does not include all the information needed to
     -- construct a complete value, any missing parts should be taken
-    -- from 1970-01-01 00:00:00 UTC (which was a Thursday).
+    -- from 1970-01-01 00:00:00 +0000 (which was a Thursday).
     buildTime :: TimeLocale -- ^ The time locale.
               -> [(Char,String)] -- ^ Pairs of format characters and the 
                                  -- corresponding part of the input.
@@ -263,7 +263,7 @@ instance ParseTime LocalTime where
     buildTime l xs = LocalTime (buildTime l xs) (buildTime l xs)
 
 instance ParseTime TimeZone where
-    buildTime _ = foldl f utc
+    buildTime _ = foldl f (minutesToTimeZone 0)
       where 
         f t@(TimeZone offset dst name) (c,x) = 
             case c of



More information about the ghc-commits mailing list