Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-old-time for openSUSE:Factory 
checked in at 2026-06-10 16:04:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-old-time (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-old-time.new.2375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-old-time"

Wed Jun 10 16:04:15 2026 rev:15 rq:1358413 version:1.1.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-old-time/ghc-old-time.changes        
2023-12-21 23:38:26.526162822 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-old-time.new.2375/ghc-old-time.changes      
2026-06-10 16:07:13.395701827 +0200
@@ -1,0 +2,21 @@
+Sat Mar  7 10:25:48 UTC 2026 - Peter Simons <[email protected]>
+
+- Update old-time to version 1.1.1.0.
+  ## 1.1.1.0  *Mar 2026*
+
+    * Workaround DST issues in `toClockTime . toUTCTime`, at least in some 
cases.
+    * Cabalize test suite.
+    * Document issues with `TimeDiff`.
+
+-------------------------------------------------------------------
+Tue Jan  6 08:48:33 UTC 2026 - Peter Simons <[email protected]>
+
+- Update old-time to version 1.1.0.5.
+  ## 1.1.0.5  *Jan 2026*
+
+    * Remove unused `includes` field in `.cabal` file
+      (Simon Hengel, [PR #17](https://github.com/haskell/old-time/pull/17)).
+    * Bump `cabal-version` to 1.18.
+    * Build tested with GHC 8.0 - 9.14.1.
+
+-------------------------------------------------------------------

Old:
----
  old-time-1.1.0.4.tar.gz

New:
----
  old-time-1.1.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-old-time.spec ++++++
--- /var/tmp/diff_new_pack.v3uMdu/_old  2026-06-10 16:07:17.419868590 +0200
+++ /var/tmp/diff_new_pack.v3uMdu/_new  2026-06-10 16:07:17.431869087 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-old-time
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2026 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,8 +18,9 @@
 
 %global pkg_name old-time
 %global pkgver %{pkg_name}-%{version}
+%bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.1.0.4
+Version:        1.1.1.0
 Release:        0
 Summary:        Time library
 License:        BSD-3-Clause
@@ -32,12 +33,16 @@
 BuildRequires:  ghc-old-locale-prof
 BuildRequires:  ghc-rpm-macros
 ExcludeArch:    %{ix86}
+%if %{with tests}
+BuildRequires:  ghc-tasty-devel
+BuildRequires:  ghc-tasty-hunit-devel
+BuildRequires:  ghc-tasty-hunit-prof
+BuildRequires:  ghc-tasty-prof
+%endif
 
 %description
-This package provides the old time library.
-
-For new projects, the newer <http://hackage.haskell.org/package/time time
-library> is recommended.
+This is a legacy package, please migrate away to
+<http://hackage.haskell.org/package/time time> or elsewhere.
 
 %package devel
 Summary:        Haskell %{pkg_name} library development files
@@ -74,6 +79,9 @@
 %install
 %ghc_lib_install
 
+%check
+%cabal_test
+
 %post devel
 %ghc_pkg_recache
 

++++++ old-time-1.1.0.4.tar.gz -> old-time-1.1.1.0.tar.gz ++++++
++++ 2079 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/old-time-1.1.0.4/System/Time.hsc new/old-time-1.1.1.0/System/Time.hsc
--- old/old-time-1.1.0.4/System/Time.hsc        2001-09-09 03:46:40.000000000 
+0200
+++ new/old-time-1.1.1.0/System/Time.hsc        2001-09-09 03:46:40.000000000 
+0200
@@ -1,6 +1,5 @@
-#if __GLASGOW_HASKELL__ >= 701
+{-# LANGUAGE CApiFFI #-}
 {-# LANGUAGE Trustworthy #-}
-#endif
 
 -----------------------------------------------------------------------------
 -- |
@@ -271,7 +270,10 @@
 -- | @'addToClockTime' d t@ adds a time difference @d@ and a
 -- clock time @t@ to yield a new clock time.  The difference @d@
 -- may be either positive or negative.
-
+--
+-- Strange things can happen when 'TimeDiff' has
+-- non-zero months and years, including but not limited
+-- to ±1 hour jump when passing in and out daylight saving time.
 addToClockTime  :: TimeDiff  -> ClockTime -> ClockTime
 addToClockTime (TimeDiff year mon day hour minute sec psec)
                (TOD c_sec c_psec) =
@@ -281,7 +283,9 @@
                      3600 * toInteger hour +
                      24 * 3600 * toInteger day
           (d_sec, d_psec) = (c_psec + psec) `quotRem` 1000000000000
-          cal      = toUTCTime (TOD (c_sec + sec_diff + d_sec) d_psec)
+
+          beforeAddingMonthsAndYears = TOD (c_sec + sec_diff + d_sec) d_psec
+          cal      = toUTCTime beforeAddingMonthsAndYears
           new_mon  = fromEnum (ctMonth cal) + r_mon
           month' = fst tmp
           yr_diff = snd tmp
@@ -294,7 +298,9 @@
 
           year' = ctYear cal + year + r_yr + yr_diff
         in
-        toClockTime cal{ctMonth=month', ctYear=year'}
+        if year == 0 && mon == 0
+          then beforeAddingMonthsAndYears
+          else toClockTime cal{ctMonth=month', ctYear=year'}
 
 -- | @'diffClockTimes' t1 t2@ returns the difference between two clock
 -- times @t1@ and @t2@ as a 'TimeDiff'.
@@ -312,8 +318,10 @@
               }
 
 
--- | converts a time difference to normal form.
-
+-- | Converts a time difference to normal form.
+--
+-- This function assumes that each month contains exactly 30 days
+-- and each year contains exactly 365 days, which is not true.
 normalizeTimeDiff :: TimeDiff -> TimeDiff
 -- FIXME: handle psecs properly
 -- FIXME: ?should be called by formatTimeDiff automagically?
@@ -367,10 +375,10 @@
 #   define tzname _tzname
 #  endif
 #  ifndef mingw32_HOST_OS
-foreign import ccall unsafe "time.h &tzname" tzname :: Ptr CString
+foreign import capi unsafe "time.h &tzname" tzname :: Ptr CString
 #  else
-foreign import ccall unsafe "__hscore_timezone" timezone :: Ptr CLong
-foreign import ccall unsafe "__hscore_tzname"   tzname :: Ptr CString
+foreign import capi unsafe "__hscore_timezone" timezone :: Ptr CLong
+foreign import capi unsafe "__hscore_tzname"   tzname :: Ptr CString
 #  endif
 zone x = do
   dst <- (#peek struct tm,tm_isdst) x
@@ -382,8 +390,8 @@
 
 -- Get the offset in secs from UTC, if (struct tm) doesn't supply it. */
 # if HAVE_DECL_ALTZONE
-foreign import ccall "&altzone"  altzone  :: Ptr CTime
-foreign import ccall "&timezone" timezone :: Ptr CTime
+foreign import capi "&altzone"  altzone  :: Ptr CTime
+foreign import capi "&timezone" timezone :: Ptr CTime
 gmtoff x = do
   dst <- (#peek struct tm,tm_isdst) x
   tz <- if dst then peek altzone else peek timezone
@@ -391,7 +399,7 @@
 # else /* ! HAVE_DECL_ALTZONE */
 
 #if !defined(mingw32_HOST_OS)
-foreign import ccall "time.h &timezone" timezone :: Ptr CLong
+foreign import capi "time.h &timezone" timezone :: Ptr CLong
 #endif
 
 -- Assume that DST offset is 1 hour ...
@@ -731,35 +739,35 @@
 type CTm = () -- struct tm
 
 #if HAVE_LOCALTIME_R
-foreign import ccall unsafe "HsTime.h __hscore_localtime_r"
+foreign import capi unsafe "HsTime.h __hscore_localtime_r"
     localtime_r :: Ptr CTime -> Ptr CTm -> IO (Ptr CTm)
 #else
-foreign import ccall unsafe "time.h localtime"
+foreign import capi unsafe "time.h localtime"
     localtime   :: Ptr CTime -> IO (Ptr CTm)
 #endif
 #if HAVE_GMTIME_R
-foreign import ccall unsafe "HsTime.h __hscore_gmtime_r"
+foreign import capi unsafe "HsTime.h __hscore_gmtime_r"
     gmtime_r    :: Ptr CTime -> Ptr CTm -> IO (Ptr CTm)
 #else
-foreign import ccall unsafe "time.h gmtime"
+foreign import capi unsafe "time.h gmtime"
     gmtime      :: Ptr CTime -> IO (Ptr CTm)
 #endif
-foreign import ccall unsafe "time.h mktime"
+foreign import capi unsafe "time.h mktime"
     mktime      :: Ptr CTm   -> IO CTime
 
 #if HAVE_GETTIMEOFDAY
 type CTimeVal = ()
 type CTimeZone = ()
-foreign import ccall unsafe "HsTime.h __hscore_gettimeofday"
+foreign import capi unsafe "HsTime.h __hscore_gettimeofday"
     gettimeofday :: Ptr CTimeVal -> Ptr CTimeZone -> IO CInt
 #elif HAVE_FTIME
 type CTimeB = ()
 #ifndef mingw32_HOST_OS
-foreign import ccall unsafe "time.h ftime" ftime :: Ptr CTimeB -> IO CInt
+foreign import capi unsafe "time.h ftime" ftime :: Ptr CTimeB -> IO CInt
 #else
-foreign import ccall unsafe "time.h ftime" ftime :: Ptr CTimeB -> IO ()
+foreign import capi unsafe "time.h ftime" ftime :: Ptr CTimeB -> IO ()
 #endif
 #else
-foreign import ccall unsafe "time.h time" time :: Ptr CTime -> IO CTime
+foreign import capi unsafe "time.h time" time :: Ptr CTime -> IO CTime
 #endif
 #endif /* ! __HUGS__ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/old-time-1.1.0.4/changelog.md new/old-time-1.1.1.0/changelog.md
--- old/old-time-1.1.0.4/changelog.md   2001-09-09 03:46:40.000000000 +0200
+++ new/old-time-1.1.1.0/changelog.md   2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,18 @@
 # Changelog for [`old-time` 
package](http://hackage.haskell.org/package/old-time)
 
+## 1.1.1.0  *Mar 2026*
+
+  * Workaround DST issues in `toClockTime . toUTCTime`, at least in some cases.
+  * Cabalize test suite.
+  * Document issues with `TimeDiff`.
+
+## 1.1.0.5  *Jan 2026*
+
+  * Remove unused `includes` field in `.cabal` file
+    (Simon Hengel, [PR #17](https://github.com/haskell/old-time/pull/17)).
+  * Bump `cabal-version` to 1.18.
+  * Build tested with GHC 8.0 - 9.14.1.
+
 ## 1.1.0.4  *Dec 2023*
 
   * Add `build-tools: hsc2hs` to `old-time.cabal` for compilation with GHC 8.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/old-time-1.1.0.4/include/HsTimeConfig.h.in 
new/old-time-1.1.1.0/include/HsTimeConfig.h.in
--- old/old-time-1.1.0.4/include/HsTimeConfig.h.in      2001-09-09 
03:46:40.000000000 +0200
+++ new/old-time-1.1.1.0/include/HsTimeConfig.h.in      2001-09-09 
03:46:40.000000000 +0200
@@ -1,26 +1,26 @@
 /* include/HsTimeConfig.h.in.  Generated from configure.ac by autoheader.  */
 
-/* Define to 1 if you have the declaration of `altzone', and to 0 if you
+/* Define to 1 if you have the declaration of 'altzone', and to 0 if you
    don't. */
 #undef HAVE_DECL_ALTZONE
 
-/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
+/* Define to 1 if you have the declaration of 'tzname', and to 0 if you don't.
    */
 #undef HAVE_DECL_TZNAME
 
-/* Define to 1 if you have the `ftime' function. */
+/* Define to 1 if you have the 'ftime' function. */
 #undef HAVE_FTIME
 
-/* Define to 1 if you have the `gettimeofday' function. */
+/* Define to 1 if you have the 'gettimeofday' function. */
 #undef HAVE_GETTIMEOFDAY
 
-/* Define to 1 if you have the `gmtime_r' function. */
+/* Define to 1 if you have the 'gmtime_r' function. */
 #undef HAVE_GMTIME_R
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define to 1 if you have the `localtime_r' function. */
+/* Define to 1 if you have the 'localtime_r' function. */
 #undef HAVE_LOCALTIME_R
 
 /* Define to 1 if you have the <stdint.h> header file. */
@@ -38,7 +38,7 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
-/* Define to 1 if `tm_zone' is a member of `struct tm'. */
+/* Define to 1 if 'tm_zone' is a member of 'struct tm'. */
 #undef HAVE_STRUCT_TM_TM_ZONE
 
 /* Define to 1 if you have the <sys/stat.h> header file. */
@@ -56,12 +56,12 @@
 /* Define to 1 if you have the <time.h> header file. */
 #undef HAVE_TIME_H
 
-/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
-   `HAVE_STRUCT_TM_TM_ZONE' instead. */
+/* Define to 1 if your 'struct tm' has 'tm_zone'. Deprecated, use
+   'HAVE_STRUCT_TM_TM_ZONE' instead. */
 #undef HAVE_TM_ZONE
 
-/* Define to 1 if you don't have `tm_zone' but do have the external array
-   `tzname'. */
+/* Define to 1 if you don't have 'tm_zone' but do have the external array
+   'tzname'. */
 #undef HAVE_TZNAME
 
 /* Define to 1 if you have the <unistd.h> header file. */
@@ -85,7 +85,7 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* Define to 1 if all of the C90 standard headers exist (not just the ones
+/* Define to 1 if all of the C89 standard headers exist (not just the ones
    required in a freestanding environment). This macro is provided for
    backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
@@ -94,5 +94,5 @@
    macro is obsolete. */
 #undef TIME_WITH_SYS_TIME
 
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* Define to 1 if your <sys/time.h> declares 'struct tm'. */
 #undef TM_IN_SYS_TIME
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/old-time-1.1.0.4/old-time.cabal new/old-time-1.1.1.0/old-time.cabal
--- old/old-time-1.1.0.4/old-time.cabal 2001-09-09 03:46:40.000000000 +0200
+++ new/old-time-1.1.1.0/old-time.cabal 2001-09-09 03:46:40.000000000 +0200
@@ -1,7 +1,6 @@
-cabal-version:  >=1.10
+cabal-version:  1.18
 name:           old-time
-version:        1.1.0.4
--- NOTE: Don't forget to update ./changelog.md
+version:        1.1.1.0
 license:        BSD3
 license-file:   LICENSE
 maintainer:     https://github.com/haskell/old-time
@@ -10,15 +9,16 @@
 category:       System
 build-type:     Configure
 description:
-    This package provides the old time library.
-    .
-    For new projects, the newer
-    <http://hackage.haskell.org/package/time time library>
-    is recommended.
+    This is a legacy package, please migrate away to
+    <http://hackage.haskell.org/package/time time> or elsewhere.
 
 tested-with:
-  GHC == 9.6.2
-  GHC == 9.4.5
+  GHC == 9.14.1
+  GHC == 9.12.2
+  GHC == 9.10.3
+  GHC == 9.8.4
+  GHC == 9.6.7
+  GHC == 9.4.8
   GHC == 9.2.8
   GHC == 9.0.2
   GHC == 8.10.7
@@ -27,12 +27,12 @@
   GHC == 8.4.4
   GHC == 8.2.2
   GHC == 8.0.2
-  GHC == 7.10.3
-  GHC == 7.8.4
+
+extra-doc-files:
+    changelog.md
 
 extra-source-files:
     aclocal.m4
-    changelog.md
     config.guess
     config.sub
     configure
@@ -53,7 +53,7 @@
 
 Library
     default-language: Haskell2010
-    other-extensions: Trustworthy
+    other-extensions: Trustworthy CApiFFI
 
     exposed-modules:
         System.Time
@@ -62,14 +62,26 @@
         cbits/timeUtils.c
 
     include-dirs: include
-    includes:     HsTime.h
     install-includes:
         HsTime.h
 
     build-depends:
-        base       >= 4.7 && < 5,
+        base       >= 4.8 && < 5,
         old-locale == 1.0.*
 
     build-tools: hsc2hs
 
     ghc-options: -Wall
+
+test-suite old-time-tests
+    type: exitcode-stdio-1.0
+    default-language: Haskell2010
+    ghc-options: -Wall
+    main-is: Tests.hs
+    hs-source-dirs: tests
+    build-depends:
+        base,
+        old-locale < 2,
+        old-time,
+        tasty < 2,
+        tasty-hunit < 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/old-time-1.1.0.4/tests/Tests.hs new/old-time-1.1.1.0/tests/Tests.hs
--- old/old-time-1.1.0.4/tests/Tests.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/old-time-1.1.1.0/tests/Tests.hs 2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,78 @@
+module Main (main) where
+
+import System.Locale (defaultTimeLocale)
+import System.Time
+import Test.Tasty
+import Test.Tasty.HUnit
+
+main :: IO ()
+main = defaultMain $ testGroup "All"
+  [ testCase "T5430" t5430
+  , testCase "time002" time002
+  , testCase "time003" time003
+  , testCase "time004" time004
+  , testCase "issue18" issue18
+  ]
+
+t5430 :: Assertion
+t5430 = do
+  let clockTime = TOD 32400 0 -- 00:00:00 on 1 Jan 1970
+  calTime <- toCalendarTime clockTime
+  -- We check for 001 or 365 (timezone locale will determine which one)
+  -- and output 001 for testing output consistently.
+  let j = formatCalendarTime defaultTimeLocale "%j" calTime
+  assertBool "Either 001 or 365" $
+    j `elem` ["001", "365"]
+
+time002 :: Assertion
+time002 = do
+  t <- getClockTime
+  let clock = show t
+  c <- toCalendarTime t
+  let cal = calendarTimeToString c
+  let t2 = toClockTime c
+      clock2 = show t2
+  assertEqual "calendarTimeToString . toCalendarTime = id" clock cal
+  assertEqual "show . toClockTime . toCalendarTime = id" clock clock2
+
+time003 :: Assertion
+time003 = do
+  time <- getClockTime
+  assertBool "does show look plausible?" $
+    plausible (show time)
+
+  let (CalendarTime year month mday hour minute sec _psec
+                    wday _yday timezone _gmtoff _isdst) = toUTCTime time
+      time2 = wdays !! fromEnum wday ++
+        (' ' : months !! fromEnum month) ++
+        (' ' : shows2 mday (' ' : shows2 hour (':' : shows2 minute (':' : 
shows2 sec
+        (' ' : timezone ++ ' ' : shows year "\n")))))
+  assertBool "does time2 look plausible?" $
+    plausible time2
+
+  where
+    wdays = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+    months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
+        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+    shows2 x = showString (pad2 x)
+    pad2 x = case show x of
+               c@[_] -> '0' : c
+               cs -> cs
+
+    plausible str = filter (== ':') str == "::"
+
+time004 :: Assertion
+time004 = do
+  time <- getClockTime
+  let (CalendarTime year month mday hour minute sec psec
+                    wday yday timezone gmtoff isdst) = toUTCTime time
+      time' = toClockTime (CalendarTime (year - 1) month mday hour minute sec 
psec
+                           wday yday timezone gmtoff isdst)
+  assertEqual "should have same length"
+    (length (show time)) (length (show time'))
+
+issue18 :: Assertion
+issue18 = do
+  let c = TOD ((19078*24+2)*3600+1357) 0
+  assertEqual "noTimeDiff should not make a diff"
+    c (addToClockTime noTimeDiff c)

Reply via email to