Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Jerry James
43c2e4c970 Fix a changelog entry 2026-01-13 16:07:40 -07:00
Richard W.M. Jones
b429b74638 OCaml 5.4.0 rebuild 2025-10-13 21:38:33 +01:00
Fedora Release Engineering
7f8bd27d2e Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 23:08:09 +00:00
Jerry James
efff9ad217 Rebuild to fix OCaml dependencies 2025-07-12 09:34:16 -06:00
Fedora Release Engineering
f3fb1b87c1 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 20:43:44 +00:00
Jerry James
76805c3b26 OCaml 5.3.0 rebuild for Fedora 42
- Add patch for a test failure
2025-01-09 17:26:28 -07:00
Richard W.M. Jones
5e7be62153 Rebuild against ocaml-re 1.13.3 (RHBZ#2316105) 2024-10-03 11:14:21 +01:00
2 changed files with 55 additions and 1 deletions

View file

@ -0,0 +1,33 @@
When the tests are executed in Mountain Standard Time, the timezone test fails:
ASSERT gap g6 Local = gap g6 UTC + gap UTC Local
File "tests/test_timezone.ml", line 37, character 2:
FAIL gap g6 Local = gap g6 UTC + gap UTC Local
Expected: `11'
Received: `-13'
--- calendar-3.0.0/tests/test_timezone.ml.orig 2022-10-11 09:39:06.000000000 -0600
+++ calendar-3.0.0/tests/test_timezone.ml 2024-12-13 11:20:28.349298798 -0700
@@ -27,6 +27,12 @@ open Time_Zone;;
let tz = Alcotest.testable (Fmt.always "timezone") (=) ;;
+let make_in_bounds x =
+ let y = x mod 24 in
+ if y < -12 then y + 24
+ else if y > 11 then y - 24
+ else y
+
let test () =
change UTC;
Alcotest.(check tz) "current () = UTC" UTC (current ());
@@ -36,7 +42,7 @@ let test () =
let g6 = UTC_Plus 6 in
Alcotest.(check int)
"gap g6 Local = gap g6 UTC + gap UTC Local"
- (gap g6 Local) (gap g6 UTC + gap UTC Local);
+ (gap g6 Local) (make_in_bounds (gap g6 UTC + gap UTC Local));
Gen_test.test_exn (lazy (change (UTC_Plus 13))) "change 13";
Gen_test.test_exn (lazy (change (UTC_Plus (-15)))) "change (-15)";
change (UTC_Plus 4);

View file

@ -15,13 +15,15 @@ ExcludeArch: %{ix86}
Name: ocaml-calendar
Epoch: 1
Version: 3.0.0
Release: 13%{?dist}
Release: 19%{?dist}
Summary: Objective Caml library for managing dates and times
License: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
URL: https://ocaml-community.github.io/calendar/
VCS: git:%{giturl}.git
Source0: %{giturl}/archive/v%{version}/calendar-%{version}.tar.gz
# Work around https://github.com/ocaml-community/calendar/issues/43
Patch: %{name}-timezone-test.patch
BuildRequires: ocaml >= 4.03
BuildRequires: ocaml-dune >= 1.0
@ -75,6 +77,25 @@ developing applications that use %{name}.
%changelog
* Mon Oct 13 2025 Richard W.M. Jones <rjones@redhat.com> - 1:3.0.0-19
- OCaml 5.4.0 rebuild
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.0.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sat Jul 12 2025 Jerry James <loganjerry@gmail.com> - 1:3.0.0-17
- Rebuild to fix OCaml dependencies
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.0.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Jan 10 2025 Jerry James <loganjerry@gmail.com> - 1:3.0.0-15
- OCaml 5.3.0 rebuild for Fedora 42
- Add patch for a test failure
* Thu Oct 03 2024 Richard W.M. Jones <rjones@redhat.com> - 1:3.0.0-14
- Rebuild against ocaml-re 1.13.3 (RHBZ#2316105)
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.0.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild