aboutsummaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/europe15
-rw-r--r--time/sys/time.h4
-rw-r--r--time/zic.c21
3 files changed, 28 insertions, 12 deletions
diff --git a/time/europe b/time/europe
index 23f45ada8d..6611520e98 100644
--- a/time/europe
+++ b/time/europe
@@ -1,4 +1,4 @@
-# @(#)europe 7.43
+# @(#)europe 7.44
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
@@ -1037,7 +1037,7 @@ Zone Europe/Sarajevo 1:13:40 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
1:00 1:00 CEST 1945 Sep 16 2:00s
- 1:00 - CET 1983
+ 1:00 - CET 1982 Oct 11
1:00 EU CE%sT
# Bulgaria
@@ -1063,7 +1063,7 @@ Zone Europe/Zagreb 1:03:52 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
1:00 1:00 CEST 1945 Sep 16 2:00s
- 1:00 - CET 1983
+ 1:00 - CET 1982 Oct 11
1:00 EU CE%sT
# Czech Republic
@@ -1562,7 +1562,7 @@ Zone Europe/Skopje 1:25:44 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
1:00 1:00 CEST 1945 Sep 16 2:00s
- 1:00 - CET 1983
+ 1:00 - CET 1982 Oct 11
1:00 EU CE%sT
# Malta
@@ -1958,7 +1958,7 @@ Zone Europe/Ljubljana 0:58:04 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
1:00 1:00 CEST 1945 Sep 16 2:00s
- 1:00 - CET 1983
+ 1:00 - CET 1982 Oct 11
1:00 EU CE%sT
# Spain
@@ -2198,7 +2198,10 @@ Zone Europe/Belgrade 1:22:00 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
1:00 1:00 CEST 1945 Sep 16 2:00s
- 1:00 - CET 1983
+# Metod Kozelj <metod.kozelj@rzs-hm.si> reports that the legal date of
+# transition to EU rules was 1982-10-11, for all of Yugoslavia at the time.
+# Shanks doesn't give as much detail, so go with Kozelj.
+ 1:00 - CET 1982 Oct 11
1:00 EU CE%sT
###############################################################################
diff --git a/time/sys/time.h b/time/sys/time.h
index c4745f1546..0204050d22 100644
--- a/time/sys/time.h
+++ b/time/sys/time.h
@@ -112,10 +112,10 @@ extern int getitimer __P ((enum __itimer_which __which,
set *OLD to the old value of timer WHICH.
Returns 0 on success, -1 on errors. */
extern int __setitimer __P ((enum __itimer_which __which,
- struct itimerval *__new,
+ __const struct itimerval *__new,
struct itimerval *__old));
extern int setitimer __P ((enum __itimer_which __which,
- struct itimerval *__new,
+ __const struct itimerval *__new,
struct itimerval *__old));
/* Change the access time of FILE to TVP[0] and
diff --git a/time/zic.c b/time/zic.c
index b9518c4649..c95887c9b4 100644
--- a/time/zic.c
+++ b/time/zic.c
@@ -1,6 +1,6 @@
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)zic.c 7.83";
+static char elsieid[] = "@(#)zic.c 7.87";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -141,8 +141,10 @@ static int leapcnt;
static int linenum;
static time_t max_time;
static int max_year;
+static int max_year_representable;
static time_t min_time;
static int min_year;
+static int min_year_representable;
static int noise;
static const char * rfilename;
static int rlinenum;
@@ -430,7 +432,7 @@ const char * const string;
cp = ecpyalloc("warning: ");
cp = ecatalloc(cp, string);
- error(string);
+ error(cp);
ifree(cp);
--errors;
}
@@ -649,6 +651,8 @@ setboundaries P((void))
}
min_year = TM_YEAR_BASE + gmtime(&min_time)->tm_year;
max_year = TM_YEAR_BASE + gmtime(&max_time)->tm_year;
+ min_year_representable = min_year;
+ max_year_representable = max_year;
}
static int
@@ -1218,6 +1222,7 @@ const char * const timep;
rp->r_todisstd = FALSE;
rp->r_todisgmt = FALSE;
*ep = '\0';
+ break;
case 'g': /* Greenwich */
case 'u': /* Universal */
case 'z': /* Zulu */
@@ -1249,7 +1254,11 @@ const char * const timep;
} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1) {
error(_("invalid starting year"));
return;
- }
+ } else if (noise)
+ if (rp->r_loyear < min_year_representable)
+ warning(_("starting year too low to be represented"));
+ else if (rp->r_loyear > max_year_representable)
+ warning(_("starting year too high to be represented"));
cp = hiyearp;
if ((lp = byword(cp, end_years)) != NULL) switch ((int) lp->l_value) {
case YR_MINIMUM:
@@ -1269,7 +1278,11 @@ const char * const timep;
} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1) {
error(_("invalid ending year"));
return;
- }
+ } else if (noise)
+ if (rp->r_loyear < min_year_representable)
+ warning(_("starting year too low to be represented"));
+ else if (rp->r_loyear > max_year_representable)
+ warning(_("starting year too high to be represented"));
if (rp->r_loyear > rp->r_hiyear) {
error(_("starting year greater than ending year"));
return;