[commit: packages/time] master: ZonedTime id names (e0937c8)

git at git.haskell.org git at git.haskell.org
Sun Dec 20 07:48:41 UTC 2015


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

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

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

commit e0937c846ffaa0958d821cd2b5b040e364e5a7db
Author: Ashley Yakeley <ashley at semantic.org>
Date:   Sat Nov 12 17:54:19 2005 -0800

    ZonedTime id names
    
    darcs-hash:20051113015419-ac6dd-d0f1b11eb888e9535372340ec3b4f3a38c36bd80


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

e0937c846ffaa0958d821cd2b5b040e364e5a7db
 Data/Time/LocalTime/Format.hs    | 4 ++--
 Data/Time/LocalTime/LocalTime.hs | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Data/Time/LocalTime/Format.hs b/Data/Time/LocalTime/Format.hs
index ccb72e9..8457086 100644
--- a/Data/Time/LocalTime/Format.hs
+++ b/Data/Time/LocalTime/Format.hs
@@ -68,9 +68,9 @@ instance FormatTime TimeOfDay where
 instance FormatTime ZonedTime where
 	formatCharacter 's' = Just (\_ zt -> show (truncate (utcTimeToPOSIXSeconds (zonedTimeToUTC zt)) :: Integer))
 	formatCharacter c = case (formatCharacter c) of
-		Just f -> Just (\locale dt -> f locale (ztLocalTime dt))
+		Just f -> Just (\locale dt -> f locale (zonedTimeToLocalTime dt))
 		Nothing -> case (formatCharacter c) of
-			Just f -> Just (\locale dt -> f locale (ztZone dt))
+			Just f -> Just (\locale dt -> f locale (zonedTimeZone dt))
 			Nothing -> Nothing
 
 instance FormatTime TimeZone where
diff --git a/Data/Time/LocalTime/LocalTime.hs b/Data/Time/LocalTime/LocalTime.hs
index 6cb0d49..c902bb6 100644
--- a/Data/Time/LocalTime/LocalTime.hs
+++ b/Data/Time/LocalTime/LocalTime.hs
@@ -52,8 +52,8 @@ localTimeToUT1 long (LocalTime (ModifiedJulianDay localMJD) tod) = ModJulianDate
 
 -- | A local time together with a TimeZone.
 data ZonedTime = ZonedTime {
-	ztLocalTime :: LocalTime,
-	ztZone :: TimeZone
+	zonedTimeToLocalTime :: LocalTime,
+	zonedTimeZone :: TimeZone
 }
 
 utcToZonedTime :: TimeZone -> UTCTime -> ZonedTime



More information about the ghc-commits mailing list