SHA256
1
0
forked from pool/dateutils
Yuchen Lin 2017-04-12 15:34:30 +00:00 committed by Git OBS Bridge
commit 528c4a7a7f
3 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From 1238f9bac1f652a0e28eab1bed66914dedbcd282 Mon Sep 17 00:00:00 2001
From: Sebastian Freundt <freundt@ga-group.nl>
Date: Mon, 3 Apr 2017 12:13:51 +0000
Subject: [PATCH] fix, when printing zones transitioning at INT_MAX in
datezone(1) use NEVER indicator
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
src/dzone.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/dzone.c b/src/dzone.c
index 4fb7769..968fd06 100644
--- a/src/dzone.c
+++ b/src/dzone.c
@@ -137,8 +137,12 @@ dz_write_nxtr(struct zrng_s r, zif_t z, const char *zn)
/* thank god there's another one */
struct ztrdtl_s zd = zif_trdtl(z, r.trno + 1);
+ if (r.next == INT_MAX) {
+ goto never;
+ }
bp += dz_strftr(bp, ep - bp, (struct ztr_s){r.next, zd.offs});
} else {
+ never:
bp += xstrlcpy(bp, never, bp - ep);
}
--
1.8.5.6

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Apr 3 12:33:47 UTC 2017 - sweet_f_a@gmx.de
- fix incompatibility with tzdata/tzcode >= 2017a,
0001-fix-when-printing-zones-transitioning-at-INT_MAX-in-.patch
-------------------------------------------------------------------
Thu Dec 15 10:27:50 UTC 2016 - sweet_f_a@gmx.de

View File

@ -46,6 +46,8 @@ License: BSD-3-Clause
Group: Productivity/Text/Utilities
Url: https://github.com/hroptatyr/dateutils/
Source: https://bitbucket.org/hroptatyr/dateutils/downloads/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM
Patch1: 0001-fix-when-printing-zones-transitioning-at-INT_MAX-in-.patch
BuildRequires: pkgconfig
BuildRequires: xz
%if 0%{?suse_version}
@ -78,6 +80,7 @@ Dateutils can be used from within matlab or ocatave.
%prep
%setup -q -n %{name}-%{xversion}
%patch1 -p1
%build
%configure \