Hello community,
here is the log from the commit of package ghc-unix-time for openSUSE:Factory checked in at 2016-10-19 13:04:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-unix-time (Old)
and /work/SRC/openSUSE:Factory/.ghc-unix-time.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-unix-time"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-unix-time/ghc-unix-time.changes 2016-07-20 09:24:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-unix-time.new/ghc-unix-time.changes 2016-10-19 13:04:46.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Sep 15 06:42:12 UTC 2016 - psimons@suse.com
+
+- Update to version 0.3.7 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
unix-time-0.3.6.tar.gz
New:
----
unix-time-0.3.7.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-unix-time.spec ++++++
--- /var/tmp/diff_new_pack.THcvg9/_old 2016-10-19 13:04:47.000000000 +0200
+++ /var/tmp/diff_new_pack.THcvg9/_new 2016-10-19 13:04:47.000000000 +0200
@@ -19,15 +19,14 @@
%global pkg_name unix-time
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.3.6
+Version: 0.3.7
Release: 0
Summary: Unix time parser/formatter and utilities
License: BSD-3-Clause
-Group: System/Libraries
+Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
BuildRequires: ghc-Cabal-devel
-# Begin cabal-rpm deps:
BuildRequires: ghc-binary-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-old-time-devel
@@ -40,7 +39,6 @@
BuildRequires: ghc-old-locale-devel
BuildRequires: ghc-time-devel
%endif
-# End cabal-rpm deps
%description
Fast parser/formatter/utilities for Unix time.
@@ -59,20 +57,14 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
-
%check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
%post devel
%ghc_pkg_recache
++++++ unix-time-0.3.6.tar.gz -> unix-time-0.3.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unix-time-0.3.6/Data/UnixTime/Conv.hs new/unix-time-0.3.7/Data/UnixTime/Conv.hs
--- old/unix-time-0.3.6/Data/UnixTime/Conv.hs 2015-10-14 07:10:32.000000000 +0200
+++ new/unix-time-0.3.7/Data/UnixTime/Conv.hs 2016-09-06 04:46:51.000000000 +0200
@@ -19,6 +19,9 @@
import System.Posix.Types (EpochTime)
import System.Time (ClockTime(..))
+-- $setup
+-- >>> import Data.Function (on)
+
foreign import ccall unsafe "c_parse_unix_time"
c_parse_unix_time :: CString -> CString -> IO CTime
@@ -38,6 +41,7 @@
-- This is a wrapper for strptime_l().
-- Many implementations of strptime_l() do not support %Z and
-- some implementations of strptime_l() do not support %z, either.
+-- 'utMicroSeconds' is always set to 0.
parseUnixTime :: Format -> ByteString -> UnixTime
parseUnixTime fmt str = unsafePerformIO $
@@ -48,6 +52,7 @@
-- |
-- Parsing 'ByteString' to 'UnixTime' interpreting as GMT.
-- This is a wrapper for strptime_l().
+-- 'utMicroSeconds' is always set to 0.
--
-- >>> parseUnixTimeGMT webDateFormat "Thu, 01 Jan 1970 00:00:00 GMT"
-- UnixTime {utSeconds = 0, utMicroSeconds = 0}
@@ -64,6 +69,8 @@
-- |
-- Formatting 'UnixTime' to 'ByteString' in local time.
-- This is a wrapper for strftime_l().
+-- 'utMicroSeconds' is ignored.
+-- The result depends on the TZ environment variable.
formatUnixTime :: Format -> UnixTime -> IO ByteString
formatUnixTime fmt t =
@@ -73,9 +80,17 @@
-- |
-- Formatting 'UnixTime' to 'ByteString' in GMT.
-- This is a wrapper for strftime_l().
+-- 'utMicroSeconds' is ignored.
--
-- >>> formatUnixTimeGMT webDateFormat $ UnixTime 0 0
-- "Thu, 01 Jan 1970 00:00:00 GMT"
+-- >>> let ut = UnixTime 100 200
+-- >>> let str = formatUnixTimeGMT "%s" ut
+-- >>> let ut' = parseUnixTimeGMT "%s" str
+-- >>> ((==) `on` utSeconds) ut ut'
+-- True
+-- >>> ((==) `on` utMicroSeconds) ut ut'
+-- False
formatUnixTimeGMT :: Format -> UnixTime -> ByteString
formatUnixTimeGMT fmt t =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unix-time-0.3.6/cbits/conv.c new/unix-time-0.3.7/cbits/conv.c
--- old/unix-time-0.3.6/cbits/conv.c 2015-10-14 07:10:32.000000000 +0200
+++ new/unix-time-0.3.7/cbits/conv.c 2016-09-06 04:46:51.000000000 +0200
@@ -15,6 +15,7 @@
#include