Hello community, here is the log from the commit of package ghc-timezone-olson for openSUSE:Factory checked in at 2020-06-19 17:19:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-timezone-olson (Old) and /work/SRC/openSUSE:Factory/.ghc-timezone-olson.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-timezone-olson" Fri Jun 19 17:19:59 2020 rev:3 rq:815196 version:0.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-timezone-olson/ghc-timezone-olson.changes 2019-12-27 13:58:33.820808922 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-timezone-olson.new.3606/ghc-timezone-olson.changes 2020-06-19 17:20:00.583310294 +0200 @@ -1,0 +2,6 @@ +Tue Jun 9 09:10:53 UTC 2020 - psim...@suse.com + +- Update timezone-olson to version 0.2.0. + Upstream does not provide a change log file. + +------------------------------------------------------------------- Old: ---- timezone-olson-0.1.9.tar.gz New: ---- timezone-olson-0.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-timezone-olson.spec ++++++ --- /var/tmp/diff_new_pack.xk3vFJ/_old 2020-06-19 17:20:01.111311682 +0200 +++ /var/tmp/diff_new_pack.xk3vFJ/_new 2020-06-19 17:20:01.119311703 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-timezone-olson # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %global pkg_name timezone-olson Name: ghc-%{pkg_name} -Version: 0.1.9 +Version: 0.2.0 Release: 0 Summary: A pure Haskell parser and renderer for binary Olson timezone files License: BSD-3-Clause ++++++ timezone-olson-0.1.9.tar.gz -> timezone-olson-0.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/timezone-olson-0.1.9/Data/Time/LocalTime/TimeZone/Olson/Parse.hs new/timezone-olson-0.2.0/Data/Time/LocalTime/TimeZone/Olson/Parse.hs --- old/timezone-olson-0.1.9/Data/Time/LocalTime/TimeZone/Olson/Parse.hs 2018-03-14 13:25:26.000000000 +0100 +++ new/timezone-olson-0.2.0/Data/Time/LocalTime/TimeZone/Olson/Parse.hs 2001-09-09 03:46:40.000000000 +0200 @@ -3,18 +3,16 @@ ----------------------------------------------------------------------------- -- | -- Module : Data.Time.LocalTime.TimeZone.Olson.Parse --- Copyright : Yitzchak Gale 2018 +-- Copyright : Yitzchak Gale 2019 -- -- Maintainer : Yitzchak Gale <g...@sefer.org> -- Portability : portable -- -- A parser for binary Olson timezone files whose format is specified --- by the tzfile(5) man page on Unix-like systems. For more --- information about this format, see --- <http://www.twinsun.com/tz/tz-link.htm>. Functions are provided for --- converting the parsed data into 'TimeZoneSeries' objects. +-- in RFC 8536. Functions are provided for converting the parsed data +-- into 'TimeZoneSeries' objects. -{- Copyright (c) 2018 Yitzchak Gale. All rights reserved. +{- Copyright (c) 2019 Yitzchak Gale. All rights reserved. For licensing information, see the BSD3-style license in the file LICENSE that was originally distributed by the author together with this file. -} @@ -65,8 +63,8 @@ where dflt = fromMaybe dflt0 . listToMaybe $ filter isStd ttinfos isStd (TtInfo _ isdst _ _) = not isdst - mkTZ (TtInfo gmtoff isdst _ abbr) = - TimeZone ((gmtoff + 30) `div` 60) isdst abbr + mkTZ (TtInfo utoff isdst _ abbr) = + TimeZone ((utoff + 30) `div` 60) isdst abbr lookupTZ ttinfos ttime = fmap (((,) $ toUTC ttime) . mkTZ) . listToMaybe $ drop (transIndex ttime) ttinfos toUTC = posixSecondsToUTCTime . fromIntegral . transTime @@ -119,6 +117,13 @@ verify (const False) msg undefined -- Parse the part of an Olson file that contains timezone data + +-- We are lenient about invalid values of @isstdcnt@ and @isutcnt@. +-- Before RFC 8536, we ignored transitions that did not have a +-- corresponding value for both @isstd@ and @isut@. Staring with RFC +-- 8536, when zero became a valid value for @isstdcont@ and @isutcnt@, +-- we extend @isstds@ and @isuts@ with default values if they are too +-- short. Thanks to Github user @mniip@ for suggesting this change. getOlsonPart :: Integral a => Bool -> SizeLimits -> Get a -> Get (Word8, OlsonData) getOlsonPart verifyMagic limits getTime = do @@ -126,7 +131,7 @@ when verifyMagic $ verify_ (== "TZif") "missing magic number" magic version <- getWord8 replicateM_ 15 getWord8 -- padding nulls - tzh_ttisgmtcnt <- get32bitInt + tzh_ttisutcnt <- get32bitInt tzh_ttisstdcnt <- get32bitInt tzh_leapcnt <- get32bitInt >>= verify (withinLimit maxLeaps) "too many leap second specifications" @@ -134,7 +139,7 @@ >>= verify (withinLimit maxTimes) "too many timezone transitions" tzh_typecnt <- get32bitInt >>= verify (withinLimit maxTypes) "too many timezone type specifications" - verify (withinLimit maxTypes) "too many isgmt specifiers" tzh_ttisgmtcnt + verify (withinLimit maxTypes) "too many isut specifiers" tzh_ttisutcnt verify (withinLimit maxTypes) "too many isstd specifiers" tzh_ttisstdcnt tzh_charcnt <- get32bitInt >>= verify (withinLimit maxAbbrChars) "too many tilezone specifiers" @@ -144,33 +149,27 @@ abbr_chars <- fmap (toASCII . B.unpack) $ getByteString tzh_charcnt leaps <- replicateM tzh_leapcnt $ getLeapInfo getTime isstds <- replicateM tzh_ttisstdcnt getBool - isgmts <- replicateM tzh_ttisgmtcnt getBool + isuts <- replicateM tzh_ttisutcnt getBool return (version, OlsonData (zipWith Transition times indexes) (map (flip lookupAbbr abbr_chars) . zipWith setTtype ttinfos $ - zipWithExtend boolsToTType False False isstds isgmts) + zipWith boolsToTType + (isstds ++ repeat False) (isuts ++ repeat False) + ) leaps Nothing ) where withinLimit limit value = maybe True (value <=) $ limit limits - lookupAbbr (TtInfo gmtoff isdst ttype abbrind) = - TtInfo gmtoff isdst ttype . takeWhile (/= '\NUL') . drop abbrind + lookupAbbr (TtInfo utoff isdst ttype abbrind) = + TtInfo utoff isdst ttype . takeWhile (/= '\NUL') . drop abbrind setTtype ttinfo ttype = ttinfo {tt_ttype = ttype} - boolsToTType _ isgmt | isgmt = UTC + boolsToTType _ isut | isut = UTC boolsToTType isstd _ - | isstd = Std - | otherwise = Wall - --- A variant of zipWith whose result is the length of the longer --- rather than the shorter list, by extending the shorter list with --- a default value -zipWithExtend :: (a -> b -> c) -> a -> b -> [a] -> [b] -> [c] -zipWithExtend f x0 y0 (x:xs) (y:ys) = f x y : zipWithExtend f x0 y0 xs ys -zipWithExtend f x0 _ [] ys = map (f x0) ys -zipWithExtend f _ y0 xs _ = map (flip f y0) xs + | isstd = Std + | otherwise = Wall -- Parse a POSIX-style TZ string. -- We don't try to understand the TZ string, we just pass it along whole. @@ -188,10 +187,10 @@ -- Data.Time.TimeZone object. getTtInfo :: Get (TtInfo Int) getTtInfo = do - gmtoff <- get32bitInt + utoff <- get32bitInt isdst <- getBool abbrind <- get8bitInt - return $ TtInfo gmtoff isdst Wall abbrind + return $ TtInfo utoff isdst Wall abbrind -- Parse leap second info. (usually not used) getLeapInfo :: Integral a => Get a -> Get LeapInfo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/timezone-olson-0.1.9/Data/Time/LocalTime/TimeZone/Olson/Render.hs new/timezone-olson-0.2.0/Data/Time/LocalTime/TimeZone/Olson/Render.hs --- old/timezone-olson-0.1.9/Data/Time/LocalTime/TimeZone/Olson/Render.hs 2018-03-14 13:25:26.000000000 +0100 +++ new/timezone-olson-0.2.0/Data/Time/LocalTime/TimeZone/Olson/Render.hs 2001-09-09 03:46:40.000000000 +0200 @@ -2,17 +2,15 @@ ----------------------------------------------------------------------------- -- | -- Module : Data.Time.LocalTime.TimeZone.Olson.Render --- Copyright : Yitzchak Gale 2018 +-- Copyright : Yitzchak Gale 2019 -- -- Maintainer : Yitzchak Gale <g...@sefer.org> -- Portability : portable -- --- Render Olson timezone data in the standard binary format as used in --- Olson timezone files, and as specified by the tzfile(5) man page on --- Unix-like systems. For more information about this format, see --- <http://www.twinsun.com/tz/tz-link.htm>. +-- Render Olson timezone data in the standard binary format used in +-- Olson timezone files, as specified in RFC 8536. -{- Copyright (c) 2018ZZ Yitzchak Gale. All rights reserved. +{- Copyright (c) 2019 Yitzchak Gale. All rights reserved. For licensing information, see the BSD3-style license in the file LICENSE that was originally distributed by the author together with this file. -} @@ -146,7 +144,7 @@ putWord8 version putByteString . B.pack $ replicate 15 0 -- padding nulls replicateM_ 2 $ putCount ttinfosWithTtype - -- tzh_ttisgmtcnt + -- tzh_ttisutcnt -- tzh_ttisstdcnt putCount leaps -- tzh_leapcnt putCount transs -- tzh_timecnt @@ -158,7 +156,7 @@ mapM_ putAbbr abbrStrings mapM_ (putLeapInfo putTime) leaps mapM_ (putBool . (== Std) . tt_ttype) ttinfosWithTtype -- isstd - mapM_ (putBool . (== UTC) . tt_ttype) ttinfosWithTtype -- isgmt + mapM_ (putBool . (== UTC) . tt_ttype) ttinfosWithTtype -- isut where putCount = put32bitIntegral . length ttinfosWithTtype = takeWhile ((<= UTC) . tt_ttype) ttinfosIndexed @@ -167,8 +165,8 @@ putAbbr abbr = putASCII "time zone abbreviation" abbr >> putWord8 0 abbrAssocs = zip abbrStrings . scanl (+) 0 $ map ((+ 1) . length) abbrStrings - ttinfosIndexed = [TtInfo gmtoff isdst ttype i | - TtInfo gmtoff isdst ttype abbr <- ttinfos, + ttinfosIndexed = [TtInfo utoff isdst ttype i | + TtInfo utoff isdst ttype abbr <- ttinfos, i <- maybeToList $ lookup abbr abbrAssocs] putPosixTZ :: Maybe String -> Put @@ -179,7 +177,7 @@ putTtInfo :: TtInfo Int -> Put putTtInfo tt = do - put32bitIntegral $ tt_gmtoff tt + put32bitIntegral $ tt_utoff tt putBool $ tt_isdst tt put8bitIntegral $ tt_abbr tt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/timezone-olson-0.1.9/Data/Time/LocalTime/TimeZone/Olson/Types.hs new/timezone-olson-0.2.0/Data/Time/LocalTime/TimeZone/Olson/Types.hs --- old/timezone-olson-0.1.9/Data/Time/LocalTime/TimeZone/Olson/Types.hs 2018-03-14 13:25:26.000000000 +0100 +++ new/timezone-olson-0.2.0/Data/Time/LocalTime/TimeZone/Olson/Types.hs 2001-09-09 03:46:40.000000000 +0200 @@ -3,19 +3,17 @@ ----------------------------------------------------------------------------- -- | -- Module : Data.Time.LocalTime.TimeZone.Olson.Types --- Copyright : Yitzchak Gale 2018 +-- Copyright : Yitzchak Gale 2019 -- -- Maintainer : Yitzchak Gale <g...@sefer.org> -- Portability : portable -- --- Data types to represent timezone data as used in Olson timezone --- files, and as specified by the tzfile(5) man page on Unix-like --- systems. For more information about this format, see --- <http://www.twinsun.com/tz/tz-link.htm>. +-- Data types to represent timezone data used in Olson timezone files, +-- as specified by RFC 8536. -- --- Both Version 1 and Version 2 timezone data can be represented. +-- Both Version 1, 2, and 3 timezone data can be represented. -{- Copyright (c) 2018 Yitzchak Gale. All rights reserved. +{- Copyright (c) 2019 Yitzchak Gale. All rights reserved. For licensing information, see the BSD3-style license in the file LICENSE that was originally distributed by the author together with this file. -} @@ -127,7 +125,7 @@ -- timezone file). data TtInfo abbr = TtInfo - {tt_gmtoff :: Int, -- ^ The offset of local clocks from UTC, + {tt_utoff :: Int, -- ^ The offset of local clocks from UTC, -- in seconds tt_isdst :: Bool, -- ^ True if local clocks are summer time tt_ttype :: TransitionType, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/timezone-olson-0.1.9/Data/Time/LocalTime/TimeZone/Olson.hs new/timezone-olson-0.2.0/Data/Time/LocalTime/TimeZone/Olson.hs --- old/timezone-olson-0.1.9/Data/Time/LocalTime/TimeZone/Olson.hs 2018-03-14 13:25:26.000000000 +0100 +++ new/timezone-olson-0.2.0/Data/Time/LocalTime/TimeZone/Olson.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,19 +1,16 @@ ----------------------------------------------------------------------------- -- | -- Module : Data.Time.LocalTime.TimeZone.Olson --- Copyright : Yitzchak Gale 2018 +-- Copyright : Yitzchak Gale 2019 -- -- Maintainer : Yitzchak Gale <g...@sefer.org> -- Portability : portable -- -- A parser and renderer for binary Olson timezone files whose format --- are specified by the tzfile(5) man page on Unix-like systems. For --- more information about this format, see --- <http://www.twinsun.com/tz/tz-link.htm>. Functions are provided for --- converting the parsed data into @TimeZoneSeries@ and @TimeZone@ --- objects. +-- is specified by RFC 8536. Functions are provided for converting the +-- parsed data into @TimeZoneSeries@ and @TimeZone@ objects. -{- Copyright (c) 2018 Yitzchak Gale. All rights reserved. +{- Copyright (c) 2019 Yitzchak Gale. All rights reserved. For licensing information, see the BSD3-style license in the file LICENSE that was originally distributed by the author together with this file. -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/timezone-olson-0.1.9/LICENSE new/timezone-olson-0.2.0/LICENSE --- old/timezone-olson-0.1.9/LICENSE 2018-03-14 13:25:26.000000000 +0100 +++ new/timezone-olson-0.2.0/LICENSE 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,4 @@ -Copyright (c) 2010-2018 Yitzchak Gale. All rights reserved. +Copyright (c) 2010-2019 Yitzchak Gale. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/timezone-olson-0.1.9/README.md new/timezone-olson-0.2.0/README.md --- old/timezone-olson-0.1.9/README.md 2018-03-14 13:25:26.000000000 +0100 +++ new/timezone-olson-0.2.0/README.md 2001-09-09 03:46:40.000000000 +0200 @@ -3,9 +3,7 @@ On Hackage: [timezone-olson](http://hackage.haskell.org/package/timezone-olson) This package provides a parser and renderer for binary Olson timezone -files whose format is specified by the tzfile(5) man page on Unix-like -systems. For more information about this format, see -[the IANA timezone database site](https://www.iana.org/time-zones). +files whose format is specified in RFC 8536. Functions are provided for converting the parsed data into `TimeZoneSeries` objects from the @@ -19,7 +17,7 @@ package for a way to include timezone informaton from a binary Olson timezone file at compile time. -Copyright (c) 2010-2018 Yitzchak Gale. All rights reserved. +Copyright (c) 2010-2019 Yitzchak Gale. All rights reserved. For licensing information, see the BSD3-style license in the file LICENSE that was originally distributed by the author together with diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/timezone-olson-0.1.9/timezone-olson.cabal new/timezone-olson-0.2.0/timezone-olson.cabal --- old/timezone-olson-0.1.9/timezone-olson.cabal 2018-03-14 13:25:26.000000000 +0100 +++ new/timezone-olson-0.2.0/timezone-olson.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,5 @@ Name: timezone-olson -Version: 0.1.9 +Version: 0.2.0 Synopsis: A pure Haskell parser and renderer for binary Olson timezone files Description: A parser and renderer for binary Olson timezone files whose format is specified by the tzfile(5) @@ -25,7 +25,7 @@ Build-type: Simple Extra-source-files: README.md, catTZ.hs, hzdump.hs Cabal-version: >=1.10 -Tested-with: GHC > 8.0 && < 8.5 +Tested-with: GHC ==8.8.1 || ==8.6.5 || ==8.4.4 || ==8.2.2 || ==8.0.2 Source-repository HEAD type: git