tz
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1999 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1998 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1997 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1996 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1995 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1994 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1993 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1992 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1991 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1990 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1989 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1988 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1987 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1986 -----
- December
- November
- 10 participants
- 7500 discussions
Ken Pizzini reviewed the proposed changes sent out last week and pointed out
a change I failed to note in the summary: the setlocale calls in zic.c and
zdump.c have been changed to use the LC_ALL parameter rather than the
LC_MESSAGES parameter. (This based on earlier electronic mail claiming that
setting only LC_MESSAGES rather than LC_ALL can lead to problems.)
As suggested by Paul Eggert, the "diff -b" output appears below.
--ado
diff -b -c old/date.c new/date.c
*** old/date.c Mon Jan 31 09:20:47 2005
--- new/date.c Mon Jan 31 14:06:49 2005
***************
*** 1,6 ****
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)date.c 7.40";
/*
** Modified from the UCB version with the SCCS ID appearing below.
*/
--- 1,6 ----
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)date.c 7.41";
/*
** Modified from the UCB version with the SCCS ID appearing below.
*/
***************
*** 664,670 ****
cp = value;
switch (dotp - cp) {
default:
! wildinput(_("time"), value, _("main part is wrong
length"));
case 12:
if (!dousg) {
cent = ATOI2(cp);
--- 664,671 ----
cp = value;
switch (dotp - cp) {
default:
! wildinput(_("time"), value,
! _("main part is wrong length"));
case 12:
if (!dousg) {
cent = ATOI2(cp);
diff -b -c old/private.h new/private.h
*** old/private.h Mon Jan 31 09:19:08 2005
--- new/private.h Mon Jan 31 14:06:49 2005
***************
*** 91,103 ****
#include "time.h"
#include "stdlib.h"
! #if HAVE_GETTEXT - 0
#include "libintl.h"
! #endif /* HAVE_GETTEXT - 0 */
! #if HAVE_SYS_WAIT_H - 0
#include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */
! #endif /* HAVE_SYS_WAIT_H - 0 */
#ifndef WIFEXITED
#define WIFEXITED(status) (((status) & 0xff) == 0)
--- 91,103 ----
#include "time.h"
#include "stdlib.h"
! #if HAVE_GETTEXT
#include "libintl.h"
! #endif /* HAVE_GETTEXT */
! #if HAVE_SYS_WAIT_H
#include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */
! #endif /* HAVE_SYS_WAIT_H */
#ifndef WIFEXITED
#define WIFEXITED(status) (((status) & 0xff) == 0)
***************
*** 106,116 ****
#define WEXITSTATUS(status) (((status) >> 8) & 0xff)
#endif /* !defined WEXITSTATUS */
! #if HAVE_UNISTD_H - 0
#include "unistd.h" /* for F_OK and R_OK */
! #endif /* HAVE_UNISTD_H - 0 */
! #if !(HAVE_UNISTD_H - 0)
#ifndef F_OK
#define F_OK 0
#endif /* !defined F_OK */
--- 106,116 ----
#define WEXITSTATUS(status) (((status) >> 8) & 0xff)
#endif /* !defined WEXITSTATUS */
! #if HAVE_UNISTD_H
#include "unistd.h" /* for F_OK and R_OK */
! #endif /* HAVE_UNISTD_H */
! #if !HAVE_UNISTD_H
#ifndef F_OK
#define F_OK 0
#endif /* !defined F_OK */
***************
*** 117,123 ****
#ifndef R_OK
#define R_OK 4
#endif /* !defined R_OK */
! #endif /* !(HAVE_UNISTD_H - 0) */
/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX.
*/
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
--- 117,123 ----
#ifndef R_OK
#define R_OK 4
#endif /* !defined R_OK */
! #endif /* !HAVE_UNISTD_H */
/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX.
*/
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
***************
*** 216,222 ****
void * irealloc P((void * pointer, int size));
void icfree P((char * pointer));
void ifree P((char * pointer));
! char * scheck P((const char *string, const char *format));
/*
** Finally, some convenience items.
--- 216,222 ----
void * irealloc P((void * pointer, int size));
void icfree P((char * pointer));
void ifree P((char * pointer));
! char * scheck P((const char *string, char *format));
/*
** Finally, some convenience items.
***************
*** 255,261 ****
** add one more for a minus sign if the type is signed.
*/
#define INT_STRLEN_MAXIMUM(type) \
! ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 +
TYPE_SIGNED(type))
#endif /* !defined INT_STRLEN_MAXIMUM */
/*
--- 255,262 ----
** add one more for a minus sign if the type is signed.
*/
#define INT_STRLEN_MAXIMUM(type) \
! ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + \
! 1 + TYPE_SIGNED(type))
#endif /* !defined INT_STRLEN_MAXIMUM */
/*
***************
*** 289,299 ****
*/
#ifndef _
! #if HAVE_GETTEXT - 0
#define _(msgid) gettext(msgid)
! #else /* !(HAVE_GETTEXT - 0) */
#define _(msgid) msgid
! #endif /* !(HAVE_GETTEXT - 0) */
#endif /* !defined _ */
#ifndef TZ_DOMAIN
--- 290,300 ----
*/
#ifndef _
! #if HAVE_GETTEXT
#define _(msgid) gettext(msgid)
! #else /* !HAVE_GETTEXT */
#define _(msgid) msgid
! #endif /* !HAVE_GETTEXT */
#endif /* !defined _ */
#ifndef TZ_DOMAIN
diff -b -c old/scheck.c new/scheck.c
*** old/scheck.c Mon Jan 31 09:20:47 2005
--- new/scheck.c Mon Jan 31 14:06:49 2005
***************
*** 1,6 ****
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)scheck.c 8.15";
#endif /* !defined lint */
#endif /* !defined NOID */
--- 1,6 ----
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)scheck.c 8.16";
#endif /* !defined lint */
#endif /* !defined NOID */
***************
*** 11,17 ****
char *
scheck(string, format)
const char * const string;
! const char * const format;
{
register char * fbuf;
register const char * fp;
--- 11,17 ----
char *
scheck(string, format)
const char * const string;
! char * const format;
{
register char * fbuf;
register const char * fp;
diff -b -c old/strftime.c new/strftime.c
*** old/strftime.c Mon Jan 31 09:20:47 2005
--- new/strftime.c Mon Jan 31 14:06:50 2005
***************
*** 1,6 ****
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)strftime.c 7.74";
/*
** Based on the UCB version with the ID appearing below.
** This is ANSIish only when "multibyte character == plain character".
--- 1,6 ----
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)strftime.c 7.75";
/*
** Based on the UCB version with the ID appearing below.
** This is ANSIish only when "multibyte character == plain character".
***************
*** 108,114 ****
static char * _add P((const char *, char *, const char *));
static char * _conv P((int, const char *, char *, const char *));
! static char * _fmt P((const char *, const struct tm *, char *, const char
*, int *));
static char * _yconv P((int, int, int, int, char *, const char *));
extern char * tzname[];
--- 108,115 ----
static char * _add P((const char *, char *, const char *));
static char * _conv P((int, const char *, char *, const char *));
! static char * _fmt P((const char *, const struct tm *, char *, const char
*,
! int *));
static char * _yconv P((int, int, int, int, char *, const char *));
extern char * tzname[];
diff -b -c old/tzfile.h new/tzfile.h
*** old/tzfile.h Mon Jan 31 09:19:08 2005
--- new/tzfile.h Mon Jan 31 14:06:49 2005
***************
*** 21,27 ****
#ifndef lint
#ifndef NOID
! static char tzfilehid[] = "@(#)tzfile.h 7.16";
#endif /* !defined NOID */
#endif /* !defined lint */
--- 21,27 ----
#ifndef lint
#ifndef NOID
! static char tzfilehid[] = "@(#)tzfile.h 7.17";
#endif /* !defined NOID */
#endif /* !defined lint */
***************
*** 172,197 ****
#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400)
- #ifndef USG
-
- /*
- ** Use of the underscored variants may cause problems if you move your
code to
- ** certain System-V-based systems; for maximum portability, use the
- ** underscore-free variants. The underscored variants are provided for
- ** backward compatibility only; they may disappear from future versions of
- ** this file.
- */
-
- #define SECS_PER_MIN SECSPERMIN
- #define MINS_PER_HOUR MINSPERHOUR
- #define HOURS_PER_DAY HOURSPERDAY
- #define DAYS_PER_WEEK DAYSPERWEEK
- #define DAYS_PER_NYEAR DAYSPERNYEAR
- #define DAYS_PER_LYEAR DAYSPERLYEAR
- #define SECS_PER_HOUR SECSPERHOUR
- #define SECS_PER_DAY SECSPERDAY
- #define MONS_PER_YEAR MONSPERYEAR
-
- #endif /* !defined USG */
-
#endif /* !defined TZFILE_H */
--- 172,175 ----
diff -b -c old/zdump.c new/zdump.c
*** old/zdump.c Mon Jan 31 09:20:47 2005
--- new/zdump.c Mon Jan 31 14:20:42 2005
***************
*** 1,4 ****
! static char elsieid[] = "@(#)zdump.c 7.61";
/*
** This code has been made independent of the rest of the time
--- 1,4 ----
! static char elsieid[] = "@(#)zdump.c 7.63";
/*
** This code has been made independent of the rest of the time
***************
*** 215,221 ****
INITIALIZE(cutlotime);
INITIALIZE(cuthitime);
#if HAVE_GETTEXT
! (void) setlocale(LC_MESSAGES, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
#endif /* defined TEXTDOMAINDIR */
--- 215,221 ----
INITIALIZE(cutlotime);
INITIALIZE(cuthitime);
#if HAVE_GETTEXT
! (void) setlocale(LC_ALL, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
#endif /* defined TEXTDOMAINDIR */
diff -b -c old/zic.c new/zic.c
*** old/zic.c Mon Jan 31 09:20:47 2005
--- new/zic.c Mon Jan 31 14:20:42 2005
***************
*** 1,4 ****
! static char elsieid[] = "@(#)zic.c 7.120";
/*
** Regardless of the type of time_t, we do our work using this type.
--- 1,4 ----
! static char elsieid[] = "@(#)zic.c 7.122";
/*
** Regardless of the type of time_t, we do our work using this type.
***************
*** 138,146 ****
static void writezone P((const char * name));
static int yearistype P((int year, const char * type));
! #if !(HAVE_STRERROR - 0)
static char * strerror P((int));
! #endif /* !(HAVE_STRERROR - 0) */
static int charcnt;
static int errors;
--- 138,146 ----
static void writezone P((const char * name));
static int yearistype P((int year, const char * type));
! #if !HAVE_STRERROR
static char * strerror P((int));
! #endif /* !HAVE_STRERROR */
static int charcnt;
static int errors;
***************
*** 380,386 ****
** Error handling.
*/
! #if !(HAVE_STRERROR - 0)
static char *
strerror(errnum)
int errnum;
--- 380,386 ----
** Error handling.
*/
! #if !HAVE_STRERROR
static char *
strerror(errnum)
int errnum;
***************
*** 391,397 ****
return (errnum > 0 && errnum <= sys_nerr) ?
sys_errlist[errnum] : _("Unknown system error");
}
! #endif /* !(HAVE_STRERROR - 0) */
static void
eats(name, num, rname, rnum)
--- 391,397 ----
return (errnum > 0 && errnum <= sys_nerr) ?
sys_errlist[errnum] : _("Unknown system error");
}
! #endif /* !HAVE_STRERROR */
static void
eats(name, num, rname, rnum)
***************
*** 448,454 ****
static void
usage P((void))
{
! (void) fprintf(stderr, _("%s: usage is %s [ --version ] [ -s ] [ -v
] [ -l localtime ] [ -p posixrules ] \\\n\t[ -d directory ] [ -L leapseconds
] [ -y yearistype ] [ filename ... ]\n"),
progname, progname);
(void) exit(EXIT_FAILURE);
}
--- 448,456 ----
static void
usage P((void))
{
! (void) fprintf(stderr, _("%s: usage is %s \
! [ --version ] [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n\
! \t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ...
]\n"),
progname, progname);
(void) exit(EXIT_FAILURE);
}
***************
*** 472,484 ****
#ifdef unix
(void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
#endif /* defined unix */
! #if HAVE_GETTEXT - 0
! (void) setlocale(LC_MESSAGES, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
#endif /* defined TEXTDOMAINDIR */
(void) textdomain(TZ_DOMAIN);
! #endif /* HAVE_GETTEXT - 0 */
progname = argv[0];
for (i = 1; i < argc; ++i)
if (strcmp(argv[i], "--version") == 0) {
--- 474,486 ----
#ifdef unix
(void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
#endif /* defined unix */
! #if HAVE_GETTEXT
! (void) setlocale(LC_ALL, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
#endif /* defined TEXTDOMAINDIR */
(void) textdomain(TZ_DOMAIN);
! #endif /* HAVE_GETTEXT */
progname = argv[0];
for (i = 1; i < argc; ++i)
if (strcmp(argv[i], "--version") == 0) {
***************
*** 631,652 ****
(void) exit(EXIT_FAILURE);
result = link(fromname, toname);
! #if (HAVE_SYMLINK - 0)
if (result != 0 &&
access(fromname, F_OK) == 0 &&
!itsdir(fromname)) {
const char *s = tofile;
register char * symlinkcontents = NULL;
- while ((s = strchr(s+1, '/')) != NULL)
- symlinkcontents = ecatalloc(symlinkcontents,
"../");
- symlinkcontents = ecatalloc(symlinkcontents,
fromfile);
! result = symlink(symlinkcontents, toname);
if (result == 0)
warning(_("hard link failed, symbolic link used"));
ifree(symlinkcontents);
}
! #endif
if (result != 0) {
const char *e = strerror(errno);
--- 633,659 ----
(void) exit(EXIT_FAILURE);
result = link(fromname, toname);
! #if HAVE_SYMLINK
if (result != 0 &&
access(fromname, F_OK) == 0 &&
!itsdir(fromname)) {
const char *s = tofile;
register char * symlinkcontents = NULL;
! while ((s = strchr(s+1, '/')) != NULL)
! symlinkcontents =
! ecatalloc(symlinkcontents,
! "../");
! symlinkcontents =
! ecatalloc(symlinkcontents,
! fromfile);
! result = symlink(symlinkcontents,
! toname);
if (result == 0)
warning(_("hard link failed, symbolic link used"));
ifree(symlinkcontents);
}
! #endif /* HAVE_SYMLINK */
if (result != 0) {
const char *e = strerror(errno);
***************
*** 1107,1113 ****
zones[nzones - 1].z_untiltime > min_time &&
zones[nzones - 1].z_untiltime < max_time &&
zones[nzones - 1].z_untiltime >= z.z_untiltime) {
! error(_("Zone continuation line end time is
not after end time of previous line"));
return FALSE;
}
}
--- 1114,1122 ----
zones[nzones - 1].z_untiltime > min_time &&
zones[nzones - 1].z_untiltime < max_time &&
zones[nzones - 1].z_untiltime >= z.z_untiltime) {
! error(_(
! "Zone continuation line end time is not after end time of previous line"
! ));
return FALSE;
}
}
***************
*** 1141,1147 ****
cp = fields[LP_YEAR];
if (sscanf(cp, scheck(cp, "%d"), &year) != 1) {
/*
! * Leapin' Lizards!
*/
error(_("invalid leaping year"));
return;
--- 1150,1156 ----
cp = fields[LP_YEAR];
if (sscanf(cp, scheck(cp, "%d"), &year) != 1) {
/*
! ** Leapin' Lizards!
*/
error(_("invalid leaping year"));
return;
***************
*** 1211,1217 ****
return;
}
if ((lp = byword(fields[LP_ROLL], leap_types)) == NULL) {
! error(_("illegal Rolling/Stationary field on Leap
line"));
return;
}
leapadd(tadd(t, tod), positive, lp->l_value, count);
--- 1220,1228 ----
return;
}
if ((lp = byword(fields[LP_ROLL], leap_types)) == NULL) {
! error(_(
! "illegal Rolling/Stationary field on Leap
line"
! ));
return;
}
leapadd(tadd(t, tod), positive, lp->l_value, count);
***************
*** 1473,1485 ****
while (fromi < timecnt && attypes[fromi].type == 0)
++fromi; /* handled by default rule
*/
for ( ; fromi < timecnt; ++fromi) {
! if (toi != 0
! && ((attypes[fromi].at
! + gmtoffs[attypes[toi - 1].type])
! <= (attypes[toi - 1].at
! + gmtoffs[toi == 1 ? 0
: attypes[toi - 2].type]))) {
! attypes[toi - 1].type = attypes[fromi].type;
continue;
}
if (toi == 0 ||
--- 1484,1495 ----
while (fromi < timecnt && attypes[fromi].type == 0)
++fromi; /* handled by default rule
*/
for ( ; fromi < timecnt; ++fromi) {
! if (toi != 0 && ((attypes[fromi].at +
! gmtoffs[attypes[toi - 1].type]) <=
! (attypes[toi - 1].at + gmtoffs[toi == 1 ? 0
: attypes[toi - 2].type]))) {
! attypes[toi - 1].type =
! attypes[fromi].type;
continue;
}
if (toi == 0 ||
***************
*** 1526,1532 ****
convert(eitol(typecnt), tzh.tzh_typecnt);
convert(eitol(charcnt), tzh.tzh_charcnt);
(void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
! #define DO(field) (void) fwrite((void *) tzh.field, (size_t) sizeof
tzh.field, (size_t) 1, fp)
DO(tzh_magic);
DO(tzh_reserved);
DO(tzh_ttisgmtcnt);
--- 1536,1543 ----
convert(eitol(typecnt), tzh.tzh_typecnt);
convert(eitol(charcnt), tzh.tzh_charcnt);
(void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
! #define DO(field) (void) fwrite((void *) tzh.field, \
! (size_t) sizeof tzh.field, (size_t) 1, fp)
DO(tzh_magic);
DO(tzh_reserved);
DO(tzh_ttisgmtcnt);
***************
*** 1746,1757 ****
}
if (*startbuf == '\0' &&
startoff == oadd(zp->z_gmtoff,
! stdoff)) {
! doabbr(startbuf,
zp->z_format,
rp->r_abbrvar,
! rp->r_stdoff != 0);
}
- }
eats(zp->z_filename, zp->z_linenum,
rp->r_filename, rp->r_linenum);
doabbr(buf, zp->z_format, rp->r_abbrvar,
--- 1757,1769 ----
}
if (*startbuf == '\0' &&
startoff ==
oadd(zp->z_gmtoff,
! stdoff))
! doabbr(startbuf,
!
zp->z_format,
rp->r_abbrvar,
! rp->r_stdoff
!=
! 0);
}
eats(zp->z_filename, zp->z_linenum,
rp->r_filename, rp->r_linenum);
doabbr(buf, zp->z_format, rp->r_abbrvar,
***************
*** 2041,2047 ****
else while ((*dp = *cp++) != '"')
if (*dp != '\0')
++dp;
! else error(_("Odd number of quotation
marks"));
} while (*cp != '\0' && *cp != '#' &&
(!isascii(*cp) || !isspace((unsigned char) *cp)));
if (isascii(*cp) && isspace((unsigned char) *cp))
--- 2053,2061 ----
else while ((*dp = *cp++) != '"')
if (*dp != '\0')
++dp;
! else error(_(
! "Odd number of quotation
marks"
! ));
} while (*cp != '\0' && *cp != '#' &&
(!isascii(*cp) || !isspace((unsigned char) *cp)));
if (isascii(*cp) && isspace((unsigned char) *cp))
***************
*** 2162,2168 ****
}
if (i < 0 || i >= len_months[isleap(y)][m]) {
if (noise)
! warning(_("rule goes past start/end of
month--will not work with pre-2004 versions of zic"));
}
}
if (dayoff < 0 && !TYPE_SIGNED(zic_t))
--- 2176,2183 ----
}
if (i < 0 || i >= len_months[isleap(y)][m]) {
if (noise)
! warning(_("rule goes past start/end of
month--\
! will not work with pre-2004 versions of zic"));
}
}
if (dayoff < 0 && !TYPE_SIGNED(zic_t))
1
0
> But I insist that there should be an entry "Asia/Beijing" first.
> "Beijing Time" is represented by Shanghai, which is a unacceptable
> situation.
As far as we are concerned, the tzid is simply an internal tag, marking a
region of the Earth that has the same timezone behavior, all the way back to
the point in time where timezones started to be used instead of solar time.
The name for that tzid may vary by language, and it should be the most
customary form for that language (or even country).
It is a bit like arguing that CN should not be the official ISO 3166 country
code for China, because it is not an acronym for the Chinese name for the
country. The common name is divorced from the particular combination of
letters used for the code. The code is an internal tag, which should be
represented with an appropriate string for whatever the user's language is.
The main purpose of the code is that it be well-defined and unique.
If Shanghai and Beijing ever had different timezone behavior, that would
warrant having a different tzid; otherwise it doesn't.
‎Mark
----- Original Message -----
From: "Funda Wang" <fundawang(a)gmail.com>
To: "Mark Davis" <mark.davis(a)jtcsv.com>
Cc: "Paul Eggert" <eggert(a)CS.UCLA.EDU>; "Tz (tz(a)elsie.nci.nih.gov)"
<tz(a)lecserver.nci.nih.gov>
Sent: Friday, February 04, 2005 14:20
Subject: Re[2]: Corrections to timezone database
> Mark> I do want to call people's attention to the CLDR project work on
timezone
> Mark> identifiers (http://unicode.org/cldr/)
> Sounds interesting. But should I join this project as an individual?
>
> Mark> (All of this can be overridden by specific localizations for
generic,
> Mark> standard, or daylight names. So if the equivalent of "Beijing Time"
is what
> Mark> is customary in Chinese, we could use that.)
> I probably don't understand what you say. Do you mean that you would do
> following modification?:
> Asia/Shanghai => 北京时间
>
> If all other countries will be using the country name, it would be fine
> that we use China(ä¸å›½).
>
> But I insist that there should be an entry "Asia/Beijing" first.
> "Beijing Time" is represented by Shanghai, which is a unacceptable
> situation.
>
2
3
> But why there are Harbin and other cities? Those cities are using the
> same timezone UTC+8, isn't it?
The others are distinguished because at some time in the past, there was
some point at which they differed in time. So in this case, Asia/Shanghai
differed from Asia/Harbin on 1980‑04‑30 15:29Z (8.5 vs. 8).
See
http://oss.software.ibm.com/cvs/icu/~checkout~/locale/docs/design/formattin…
(now slightly out of date).
‎Mark
----- Original Message -----
From: "Funda Wang" <fundawang(a)gmail.com>
To: "Mark Davis" <mark.davis(a)jtcsv.com>
Cc: "Paul Eggert" <eggert(a)CS.UCLA.EDU>; "Tz (tz(a)elsie.nci.nih.gov)"
<tz(a)lecserver.nci.nih.gov>
Sent: Saturday, February 05, 2005 15:09
Subject: Re[4]: Corrections to timezone database
> Mark> The name for that tzid may vary by language, and it should be the
most
> Mark> customary form for that language (or even country).
> Sure. Then, "Beijing Time" is the most commonly used in China, no matter
> how crowded Shanghai is.
>
> Mark> It is a bit like arguing that CN should not be the official ISO 3166
country
> Mark> code for China, because it is not an acronym for the Chinese name
for the
> Mark> country.
> But we have zh_CN as an acceptable choices.
>
> Mark> If Shanghai and Beijing ever had different timezone behavior, that
would
> Mark> warrant having a different tzid; otherwise it doesn't.
> But why there are Harbin and other cities? Those cities are using the
> same timezone UTC+8, isn't it? AFAIK, Beijing is more crowded than
> Harbin or Chongqing. And, although Urmuqi is located in UTC+7 timezone,
> the official timezone of Xinjiang is UTC+8 - Beijing Time.
>
>
>
1
0
I'll post this to the list, in case others are curious.
>From http://unicode.org/cldr/ you can find out about the membership and
participation. Anyone can file a bug against the database. See Filing Bug
Reports on that page.
‎Mark
----- Original Message -----
From: "walter harms" <wharms(a)bfs.de>
To: "Mark Davis" <mark.davis(a)jtcsv.com>
Sent: Friday, February 04, 2005 09:07
Subject: Re: Corrections to timezone database
> I mark,
> who collects remarks about the translation ?
>
> I have some Problems since the 'official Name' and the common name differ:
> e.g.:
> belarus/weisrussland (even the pages:
>
http://www.auswaertiges-amt.de/www/de/laenderinfos/laender/laender_ausgabe_…
> mix these)
>
>
> Côte d’Ivoire: Elfenbeinküste
> Suriname: -> sometimes: Surinam
>
> re,
> walter
>
>
>
> Mark Davis wrote:
> > I do want to call people's attention to the CLDR project work on
timezone
> > identifiers (http://unicode.org/cldr/)
> >
> > We are in the process of gathering localization data for this coming
> > release. We have gathered some data for the locales {locale identifiers:
ar
> > cs da de en es fi fr hu it ja nb nl pl pt pt_PT ru sv tr zh zh_Hant},
and
> > are working on fleshing those out and adding more (we're not done yet!).
See
> > http://unicode.org/cldr/data/dropbox/timezones/.
> >
> > For example, the following shows the current translations using the data
we
> > have (for German):
> >
> > http://unicode.org/cldr/data/dropbox/timezones/de_current.html
> >
> > And the following shows a checklist for translators (note: in many cases
> > those don't *need* translation, since they are the same as the default
> > names.)
> >
> > http://unicode.org/cldr/data/dropbox/timezones/de_to_localize.xml
> >
> > =====
> >
> > The mechanism we use for the generic (wall time) tzid is:
> >
> > If a country has a single zone, we use the country name. Example (from
> > Chinese simplified):
> >
> > Europe/Brussels => 比利时
> >
> > Otherwise we use the last field of the TZID, followed by the country
name in
> > parens. Example:
> >
> > Australia/Melbourne => 墨尔本 (澳大利亚)
> >
> > We are going to be adding additional information where one zones in
> > *certain* multi-zone countries will just use the country name. Example,
we
> > have currently:
> >
> > Asia/Shanghai => 上海 (ä¸å›½)
> > Asia/Kashgar => 喀什葛尔 (ä¸å›½)
> >
> > Once we have that data, we'll generate:
> >
> > Asia/Shanghai => ä¸å›½
> > Asia/Kashgar => 喀什葛尔 (ä¸å›½)
> >
> > (All of this can be overridden by specific localizations for generic,
> > standard, or daylight names. So if the equivalent of "Beijing Time" is
what
> > is customary in Chinese, we could use that.)
> >
> > ‎Mark
> >
> > ----- Original Message -----
> > From: "Paul Eggert" <eggert(a)CS.UCLA.EDU>
> > To: "Funda Wang" <fundawang(a)gmail.com>
> > Cc: "Tz (tz(a)elsie.nci.nih.gov)" <tz(a)lecserver.nci.nih.gov>
> > Sent: Friday, February 04, 2005 00:08
> > Subject: Re: Corrections to timezone database
> >
> >
> >
> >>Funda Wang <fundawang(a)gmail.com> writes:
> >>
> >>
> >>>In fact, we do not have an official abbreviation for "The Time of
> >>>Beijing", as we do not use English :)
> >>
> >>OK, in that case we should probably stick with "CST", as it
> >>abbreviates the most commonly used English phrase for the time in
> >>China.
> >>
> >>The tz database is an English database, by and large. For example, it
> >>uses the abbreviation "CET" for Central European Time even though most
> >>residents of Central Europe use other abbrevations like "MEZ". We
> >>don't currently have the resources to localize all the abbreviations,
> >>so we stick with English ones. If and when the database is localized,
> >>we will transliterate "CST" in China to the appropriate Chinese
> >>characters (e.g., the characters for "The Time of Beijing").
> >>
> >>
> >>>the main reason that there should be a "Beijing" is that we call
> >>>UTC+8 as "The Time of Beijing".
> >>
> >>There is longstanding precedent in the tz database for decoupling tz
> >>zone labels from informal time zone names. For example, the tz label
> >>"Europe/London" denotes local time in England, even though the people
> >>in England call their local time "Greenwich Mean Time". The case of
> >>Beijing is somewhat similar.
> >>
> >>
> >
> >
> >
>
1
0
Funda Wang <fundawang(a)gmail.com> writes:
> In fact, we do not have an official abbreviation for "The Time of
> Beijing", as we do not use English :)
OK, in that case we should probably stick with "CST", as it
abbreviates the most commonly used English phrase for the time in
China.
The tz database is an English database, by and large. For example, it
uses the abbreviation "CET" for Central European Time even though most
residents of Central Europe use other abbrevations like "MEZ". We
don't currently have the resources to localize all the abbreviations,
so we stick with English ones. If and when the database is localized,
we will transliterate "CST" in China to the appropriate Chinese
characters (e.g., the characters for "The Time of Beijing").
> the main reason that there should be a "Beijing" is that we call
> UTC+8 as "The Time of Beijing".
There is longstanding precedent in the tz database for decoupling tz
zone labels from informal time zone names. For example, the tz label
"Europe/London" denotes local time in England, even though the people
in England call their local time "Greenwich Mean Time". The case of
Beijing is somewhat similar.
2
1
Feb. 4, 2005
Funda Wang is not on the time zone mailing list; direct replies
appropriately.
--ado
-----Original Message-----
From: Funda Wang [mailto:fundawang@gmail.com]
Sent: Thursday, February 03, 2005 1:14 PM
To: Olson, Arthur David (NIH/NCI)
Subject: Re[2]: Corrections to timezone database
Olson,> The normal procedure is to use the most populous city in the time
zone; thus
Olson,> Shanghai rather than Beijing (and New York rather than Washington).
Thanks for your clear explanation. The reason why Shanghai is the most
populouse city in China is that there is no surburb around Shanghai. For
other municipalities such as Beijing, Tianjin and Chongqing, there are a
large area of surburb around them, while the population density of these
surbub areas is far more lower than downtown.
Anyway, I do think there should be a "Beijing" in timezone list. The
timezone we Chinese are using is UTC+8, which is called "The Time of
Beijing(TTB)" in China, rather "China Standard Time(CST)", no matter what
number of population density do beijing have. Even in the western part of
China, say Urumqi, they are using TTB while the actual geographic timezone
it locates is UTC+7. And, you may know, someone may take it as political
issue the lack of Beijing.
2
1
Below are proposed minor cleanups for the time zone code.
1. There's a change to the declarations of the "scheck" function to avoid a
lint gripe.
2. Preprocessor directives of the form
#if WHATEVER - 0
have been changed to the form
#if WHATEVER
under the assumption that we're working with ANSI standard compilers.
3. The underscored variants of definitions of constants such as
SECSPERDAY
have been eliminated, in line with a long-standing comment in the code.
4. And the bulk of the changes are cleanups to white space and line lengths.
--ado
diff -r -c old/Makefile new/Makefile
*** old/Makefile Mon Jan 31 09:21:22 2005
--- new/Makefile Mon Jan 31 14:06:12 2005
***************
*** 1,4 ****
! # @(#)Makefile 7.106
# Change the line below for your time zone (after finding the zone you
want in
# the time zone files, or adding it to a time zone file).
--- 1,4 ----
! # @(#)Makefile 7.107
# Change the line below for your time zone (after finding the zone you
want in
# the time zone files, or adding it to a time zone file).
***************
*** 398,404 ****
tar cf - $(DOCS) $(SOURCES) $(MISC) *.[1-8].txt | gzip -9 >
tzcode.tar.gz
tar cf - $(DATA) | gzip -9 > tzdata.tar.gz
! typecheck:
make clean
for i in "long long" unsigned double; \
do \
--- 398,404 ----
tar cf - $(DOCS) $(SOURCES) $(MISC) *.[1-8].txt | gzip -9 >
tzcode.tar.gz
tar cf - $(DATA) | gzip -9 > tzdata.tar.gz
! typecheck:
make clean
for i in "long long" unsigned double; \
do \
diff -r -c old/asctime.c new/asctime.c
*** old/asctime.c Mon Jan 31 09:20:46 2005
--- new/asctime.c Mon Jan 31 14:06:49 2005
***************
*** 11,17 ****
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)asctime.c 7.30";
#endif /* !defined NOID */
#endif /* !defined lint */
--- 11,17 ----
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)asctime.c 7.31";
#endif /* !defined NOID */
#endif /* !defined lint */
***************
*** 98,104 ****
/*
** We avoid using snprintf since it's not available on all systems.
*/
! (void) sprintf(result,
((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B),
wn, mn,
timeptr->tm_mday, timeptr->tm_hour,
--- 98,104 ----
/*
** We avoid using snprintf since it's not available on all systems.
*/
! (void) sprintf(result,
((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B),
wn, mn,
timeptr->tm_mday, timeptr->tm_hour,
diff -r -c old/asia new/asia
*** old/asia Mon Jan 17 18:36:16 2005
--- new/asia Mon Jan 31 14:06:50 2005
***************
*** 1,4 ****
! # @(#)asia 7.78
# 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
--- 1,4 ----
! # @(#)asia 7.79
# 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
***************
*** 337,343 ****
# President Eduard Shevardnadze decreed Wednesday.
#
# From the BBC via Joseph S. Myers (2004-06-27):
! #
# Georgia moved closer to Western Europe on Sunday... The former Soviet
# republic has changed its time zone back to that of Moscow. As a result
it
# is now just four hours ahead of Greenwich Mean Time, rather than five
hours
--- 337,343 ----
# President Eduard Shevardnadze decreed Wednesday.
#
# From the BBC via Joseph S. Myers (2004-06-27):
! #
# Georgia moved closer to Western Europe on Sunday... The former Soviet
# republic has changed its time zone back to that of Moscow. As a result
it
# is now just four hours ahead of Greenwich Mean Time, rather than five
hours
diff -r -c old/date.c new/date.c
*** old/date.c Mon Jan 31 09:20:47 2005
--- new/date.c Mon Jan 31 14:06:49 2005
***************
*** 1,6 ****
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)date.c 7.40";
/*
** Modified from the UCB version with the SCCS ID appearing below.
*/
--- 1,6 ----
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)date.c 7.41";
/*
** Modified from the UCB version with the SCCS ID appearing below.
*/
***************
*** 664,670 ****
cp = value;
switch (dotp - cp) {
default:
! wildinput(_("time"), value, _("main part is wrong
length"));
case 12:
if (!dousg) {
cent = ATOI2(cp);
--- 664,671 ----
cp = value;
switch (dotp - cp) {
default:
! wildinput(_("time"), value,
! _("main part is wrong length"));
case 12:
if (!dousg) {
cent = ATOI2(cp);
diff -r -c old/difftime.c new/difftime.c
*** old/difftime.c Mon Jan 31 09:20:47 2005
--- new/difftime.c Mon Jan 31 14:06:49 2005
***************
*** 5,11 ****
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)difftime.c 7.17";
#endif /* !defined NOID */
#endif /* !defined lint */
--- 5,11 ----
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)difftime.c 7.18";
#endif /* !defined NOID */
#endif /* !defined lint */
***************
*** 57,63 ****
/*
** Stay calm...decent optimizers will eliminate the complexity
below.
*/
! if (time1 >= 0 /* && time0 < 0 */)
return (unsigned long) time1 +
(unsigned long) (-(time0 + 1)) + 1;
return -(double) ((unsigned long) time0 +
--- 57,63 ----
/*
** Stay calm...decent optimizers will eliminate the complexity
below.
*/
! if (time1 >= 0 /* && time0 < 0 */)
return (unsigned long) time1 +
(unsigned long) (-(time0 + 1)) + 1;
return -(double) ((unsigned long) time0 +
diff -r -c old/leapseconds new/leapseconds
*** old/leapseconds Mon Jan 17 18:36:18 2005
--- new/leapseconds Mon Jan 31 14:06:50 2005
***************
*** 1,4 ****
! # @(#)leapseconds 7.18
# Allowance for leapseconds added to each timezone file.
--- 1,4 ----
! # @(#)leapseconds 7.19
# Allowance for leapseconds added to each timezone file.
***************
*** 44,52 ****
Leap 1997 Jun 30 23:59:60 + S
Leap 1998 Dec 31 23:59:60 + S
! # INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE
REFERENCE
! #
# SERVICE DE LA ROTATION TERRESTRE
# OBSERVATOIRE DE PARIS
# 61, Av. de l'Observatoire 75014 PARIS (France)
--- 44,52 ----
Leap 1997 Jun 30 23:59:60 + S
Leap 1998 Dec 31 23:59:60 + S
! # INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE
REFERENCE
! #
# SERVICE DE LA ROTATION TERRESTRE
# OBSERVATOIRE DE PARIS
# 61, Av. de l'Observatoire 75014 PARIS (France)
***************
*** 53,80 ****
# Tel. : 33 (0) 1 40 51 22 26
# FAX : 33 (0) 1 40 51 22 91
# Internet : services.iers(a)obspm.fr
! #
! # Paris, 21 July 2004
! #
! #
! # Bulletin C 28
! #
! # To authorities responsible
! # for the measurement and
! # distribution of time
! #
! # INFORMATION ON UTC - TAI
! #
# NO positive leap second will be introduced at the end of December 2004.
# The difference between UTC and the International Atomic Time TAI is:
! #
! # from 1999 January 1, 0h UTC, until further notice : UTC-TAI = -32 s
! #
# Leap seconds can be introduced in UTC at the end of the months of
December
# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed
every
# six months, either to announce a time step in UTC, or to confirm that
there
# will be no time step at the next possible date.
! #
! # Daniel GAMBIS
! # Director
! # Earth Orientation Center of IERS
--- 53,80 ----
# Tel. : 33 (0) 1 40 51 22 26
# FAX : 33 (0) 1 40 51 22 91
# Internet : services.iers(a)obspm.fr
! #
! # Paris, 21 July 2004
! #
! #
! # Bulletin C 28
! #
! # To authorities responsible
! # for the measurement and
! # distribution of time
! #
! # INFORMATION ON UTC - TAI
! #
# NO positive leap second will be introduced at the end of December 2004.
# The difference between UTC and the International Atomic Time TAI is:
! #
! # from 1999 January 1, 0h UTC, until further notice : UTC-TAI = -32 s
! #
# Leap seconds can be introduced in UTC at the end of the months of
December
# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed
every
# six months, either to announce a time step in UTC, or to confirm that
there
# will be no time step at the next possible date.
! #
! # Daniel GAMBIS
! # Director
! # Earth Orientation Center of IERS
diff -r -c old/localtime.c new/localtime.c
*** old/localtime.c Mon Jan 31 09:20:46 2005
--- new/localtime.c Mon Jan 31 14:09:31 2005
***************
*** 5,11 ****
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)localtime.c 7.90";
#endif /* !defined NOID */
#endif /* !defined lint */
--- 5,11 ----
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)localtime.c 7.91";
#endif /* !defined NOID */
#endif /* !defined lint */
***************
*** 47,55 ****
** 5. They might reference tm.TM_ZONE after calling offtime.
** What's best to do in the above cases is open to debate;
** for now, we just set things up so that in any of the five cases
! ** WILDABBR is used. Another possibility: initialize tzname[0] to the
** string "tzname[0] used before set", and similarly for the other cases.
! ** And another: initialize tzname[0] to "ERA", with an explanation in the
** manual page of what this "time zone abbreviation" means (doing this so
** that tzname[0] has the "normal" length of three characters).
*/
--- 47,55 ----
** 5. They might reference tm.TM_ZONE after calling offtime.
** What's best to do in the above cases is open to debate;
** for now, we just set things up so that in any of the five cases
! ** WILDABBR is used. Another possibility: initialize tzname[0] to the
** string "tzname[0] used before set", and similarly for the other cases.
! ** And another: initialize tzname[0] to "ERA", with an explanation in the
** manual page of what this "time zone abbreviation" means (doing this so
** that tzname[0] has the "normal" length of three characters).
*/
***************
*** 453,459 ****
/*
** Given a pointer into a time zone string, scan until a character that is
not
! ** a valid character in a zone name is found. Return a pointer to that
** character.
*/
--- 453,459 ----
/*
** Given a pointer into a time zone string, scan until a character that is
not
! ** a valid character in a zone name is found. Return a pointer to that
** character.
*/
***************
*** 534,540 ****
*secsp += num * SECSPERMIN;
if (*strp == ':') {
++strp;
! /* `SECSPERMIN' allows for leap seconds. */
strp = getnum(strp, &num, 0, SECSPERMIN);
if (strp == NULL)
return NULL;
--- 534,540 ----
*secsp += num * SECSPERMIN;
if (*strp == ':') {
++strp;
! /* `SECSPERMIN' allows for leap seconds. */
strp = getnum(strp, &num, 0, SECSPERMIN);
if (strp == NULL)
return NULL;
***************
*** 573,579 ****
/*
** Given a pointer into a time zone string, extract a rule in the form
! ** date[/time]. See POSIX section 8 for the format of "date" and "time".
** If a valid rule is not found, return NULL.
** Otherwise, return a pointer to the first character not part of the
rule.
*/
--- 573,579 ----
/*
** Given a pointer into a time zone string, extract a rule in the form
! ** date[/time]. See POSIX section 8 for the format of "date" and "time".
** If a valid rule is not found, return NULL.
** Otherwise, return a pointer to the first character not part of the
rule.
*/
***************
*** 692,698 ****
dow += DAYSPERWEEK;
/*
! ** "dow" is the day-of-week of the first day of the month.
Get
** the day-of-month (zero-origin) of the first "dow" day of
the
** month.
*/
--- 692,698 ----
dow += DAYSPERWEEK;
/*
! ** "dow" is the day-of-week of the first day of the month.
Get
** the day-of-month (zero-origin) of the first "dow" day of
the
** month.
*/
***************
*** 715,721 ****
/*
** "value" is the Epoch-relative time of 00:00:00 UTC on the day in
! ** question. To get the Epoch-relative time of the specified local
** time on that day, add the transition time and the current offset
** from UTC.
*/
--- 715,721 ----
/*
** "value" is the Epoch-relative time of 00:00:00 UTC on the day in
! ** question. To get the Epoch-relative time of the specified local
** time on that day, add the transition time and the current offset
** from UTC.
*/
***************
*** 1022,1028 ****
/*
** The easy way to behave "as if no library function calls" localtime
** is to not call it--so we drop its guts into "localsub", which can be
! ** freely called. (And no, the PANS doesn't require the above behavior--
** but it *is* desirable.)
**
** The unused offset argument is for the benefit of mktime variants.
--- 1022,1028 ----
/*
** The easy way to behave "as if no library function calls" localtime
** is to not call it--so we drop its guts into "localsub", which can be
! ** freely called. (And no, the PANS doesn't require the above behavior--
** but it *is* desirable.)
**
** The unused offset argument is for the benefit of mktime variants.
***************
*** 1178,1184 ****
leaps_thru_end_of(y)
register const int y;
{
! return (y >= 0) ? (y / 4 - y / 100 + y / 400) :
-(leaps_thru_end_of(-(y + 1)) + 1);
}
--- 1178,1184 ----
leaps_thru_end_of(y)
register const int y;
{
! return (y >= 0) ? (y / 4 - y / 100 + y / 400) :
-(leaps_thru_end_of(-(y + 1)) + 1);
}
***************
*** 1302,1308 ****
tmp->tm_min = (int) (rem / SECSPERMIN);
/*
** A positive leap second requires a special
! ** representation. This uses "... ??:59:60" et seq.
*/
tmp->tm_sec = (int) (rem % SECSPERMIN) + hit;
ip = mon_lengths[isleap(y)];
--- 1302,1308 ----
tmp->tm_min = (int) (rem / SECSPERMIN);
/*
** A positive leap second requires a special
! ** representation. This uses "... ??:59:60" et seq.
*/
tmp->tm_sec = (int) (rem % SECSPERMIN) + hit;
ip = mon_lengths[isleap(y)];
***************
*** 1323,1329 ****
/*
** Section 4.12.3.2 of X3.159-1989 requires that
** The ctime function converts the calendar time pointed to by timer
! ** to local time in the form of a string. It is equivalent to
** asctime(localtime(timer))
*/
return asctime(localtime(timep));
--- 1323,1329 ----
/*
** Section 4.12.3.2 of X3.159-1989 requires that
** The ctime function converts the calendar time pointed to by timer
! ** to local time in the form of a string. It is equivalent to
** asctime(localtime(timer))
*/
return asctime(localtime(timep));
***************
*** 1344,1350 ****
** The "best" way to do mktime I think is based on an idea of Bob
** Kridle's (so its said...) from a long time ago.
** [kridle(a)xinet.com as of 1996-01-16.]
! ** It does a binary search of the time_t space. Since time_t's are
** just 32 bits, its a max of 32 iterations (even at 64 bits it
** would still be very reasonable).
*/
--- 1344,1350 ----
** The "best" way to do mktime I think is based on an idea of Bob
** Kridle's (so its said...) from a long time ago.
** [kridle(a)xinet.com as of 1996-01-16.]
! ** It does a binary search of the time_t space. Since time_t's are
** just 32 bits, its a max of 32 iterations (even at 64 bits it
** would still be very reasonable).
*/
***************
*** 1494,1500 ****
return WRONG;
yourtm.tm_year = y;
if (yourtm.tm_year != y)
! return WRONG;
if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN)
saved_seconds = 0;
else if (y + TM_YEAR_BASE < EPOCH_YEAR) {
--- 1494,1500 ----
return WRONG;
yourtm.tm_year = y;
if (yourtm.tm_year != y)
! return WRONG;
if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN)
saved_seconds = 0;
else if (y + TM_YEAR_BASE < EPOCH_YEAR) {
***************
*** 1813,1819 ****
tzset();
/*
** For a positive leap second hit, the result
! ** is not unique. For a negative leap second
** hit, the corresponding time doesn't exist,
** so we return an adjacent second.
*/
--- 1813,1819 ----
tzset();
/*
** For a positive leap second hit, the result
! ** is not unique. For a negative leap second
** hit, the corresponding time doesn't exist,
** so we return an adjacent second.
*/
diff -r -c old/newstrftime.3 new/newstrftime.3
*** old/newstrftime.3 Mon Jan 31 09:20:46 2005
--- new/newstrftime.3 Mon Jan 31 14:06:49 2005
***************
*** 151,163 ****
is replaced by a newline.
.TP
%p
! is replaced by the locale's equivalent of either AM or PM.
.TP
%R
is replaced by the time in the format %H:%M.
.TP
%r
! is replaced by the locale's representation of 12-hour clock time
using AM/PM notation.
.TP
%S
--- 151,163 ----
is replaced by a newline.
.TP
%p
! is replaced by the locale's equivalent of either AM or PM.
.TP
%R
is replaced by the time in the format %H:%M.
.TP
%r
! is replaced by the locale's representation of 12-hour clock time
using AM/PM notation.
.TP
%S
***************
*** 227,230 ****
newtzset(3),
time(2),
tzfile(5)
! .\" @(#)newstrftime.3 7.14
--- 227,230 ----
newtzset(3),
time(2),
tzfile(5)
! .\" @(#)newstrftime.3 7.15
diff -r -c old/northamerica new/northamerica
*** old/northamerica Mon Jan 17 18:36:17 2005
--- new/northamerica Mon Jan 31 14:06:50 2005
***************
*** 1,4 ****
! # @(#)northamerica 7.71
# also includes Central America and the Caribbean
# This data is by no means authoritative; if you think you know better,
--- 1,4 ----
! # @(#)northamerica 7.72
# also includes Central America and the Caribbean
# This data is by no means authoritative; if you think you know better,
***************
*** 445,451 ****
# Lemhi, Lincoln, Madison, Minidoka, Oneida, Owyhee, Payette, Power,
# Teton, Twin Falls, Valley, Washington counties) and eastern Oregon
# switched four weeks late in 1974.
! #
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:00
-8:00 US P%sT 1923 May 13 2:00
--- 445,451 ----
# Lemhi, Lincoln, Madison, Minidoka, Oneida, Owyhee, Payette, Power,
# Teton, Twin Falls, Valley, Washington counties) and eastern Oregon
# switched four weeks late in 1974.
! #
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:00
-8:00 US P%sT 1923 May 13 2:00
diff -r -c old/private.h new/private.h
*** old/private.h Mon Jan 31 09:19:08 2005
--- new/private.h Mon Jan 31 14:06:49 2005
***************
*** 91,103 ****
#include "time.h"
#include "stdlib.h"
! #if HAVE_GETTEXT - 0
#include "libintl.h"
! #endif /* HAVE_GETTEXT - 0 */
! #if HAVE_SYS_WAIT_H - 0
#include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */
! #endif /* HAVE_SYS_WAIT_H - 0 */
#ifndef WIFEXITED
#define WIFEXITED(status) (((status) & 0xff) == 0)
--- 91,103 ----
#include "time.h"
#include "stdlib.h"
! #if HAVE_GETTEXT
#include "libintl.h"
! #endif /* HAVE_GETTEXT */
! #if HAVE_SYS_WAIT_H
#include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */
! #endif /* HAVE_SYS_WAIT_H */
#ifndef WIFEXITED
#define WIFEXITED(status) (((status) & 0xff) == 0)
***************
*** 106,116 ****
#define WEXITSTATUS(status) (((status) >> 8) & 0xff)
#endif /* !defined WEXITSTATUS */
! #if HAVE_UNISTD_H - 0
#include "unistd.h" /* for F_OK and R_OK */
! #endif /* HAVE_UNISTD_H - 0 */
! #if !(HAVE_UNISTD_H - 0)
#ifndef F_OK
#define F_OK 0
#endif /* !defined F_OK */
--- 106,116 ----
#define WEXITSTATUS(status) (((status) >> 8) & 0xff)
#endif /* !defined WEXITSTATUS */
! #if HAVE_UNISTD_H
#include "unistd.h" /* for F_OK and R_OK */
! #endif /* HAVE_UNISTD_H */
! #if !HAVE_UNISTD_H
#ifndef F_OK
#define F_OK 0
#endif /* !defined F_OK */
***************
*** 117,125 ****
#ifndef R_OK
#define R_OK 4
#endif /* !defined R_OK */
! #endif /* !(HAVE_UNISTD_H - 0) */
! /* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX.
*/
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
/*
--- 117,125 ----
#ifndef R_OK
#define R_OK 4
#endif /* !defined R_OK */
! #endif /* !HAVE_UNISTD_H */
! /* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX.
*/
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
/*
***************
*** 216,222 ****
void * irealloc P((void * pointer, int size));
void icfree P((char * pointer));
void ifree P((char * pointer));
! char * scheck P((const char *string, const char *format));
/*
** Finally, some convenience items.
--- 216,222 ----
void * irealloc P((void * pointer, int size));
void icfree P((char * pointer));
void ifree P((char * pointer));
! char * scheck P((const char *string, char *format));
/*
** Finally, some convenience items.
***************
*** 255,261 ****
** add one more for a minus sign if the type is signed.
*/
#define INT_STRLEN_MAXIMUM(type) \
! ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 +
TYPE_SIGNED(type))
#endif /* !defined INT_STRLEN_MAXIMUM */
/*
--- 255,262 ----
** add one more for a minus sign if the type is signed.
*/
#define INT_STRLEN_MAXIMUM(type) \
! ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + \
! 1 + TYPE_SIGNED(type))
#endif /* !defined INT_STRLEN_MAXIMUM */
/*
***************
*** 289,299 ****
*/
#ifndef _
! #if HAVE_GETTEXT - 0
#define _(msgid) gettext(msgid)
! #else /* !(HAVE_GETTEXT - 0) */
#define _(msgid) msgid
! #endif /* !(HAVE_GETTEXT - 0) */
#endif /* !defined _ */
#ifndef TZ_DOMAIN
--- 290,300 ----
*/
#ifndef _
! #if HAVE_GETTEXT
#define _(msgid) gettext(msgid)
! #else /* !HAVE_GETTEXT */
#define _(msgid) msgid
! #endif /* !HAVE_GETTEXT */
#endif /* !defined _ */
#ifndef TZ_DOMAIN
diff -r -c old/scheck.c new/scheck.c
*** old/scheck.c Mon Jan 31 09:20:47 2005
--- new/scheck.c Mon Jan 31 14:06:49 2005
***************
*** 1,6 ****
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)scheck.c 8.15";
#endif /* !defined lint */
#endif /* !defined NOID */
--- 1,6 ----
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)scheck.c 8.16";
#endif /* !defined lint */
#endif /* !defined NOID */
***************
*** 11,17 ****
char *
scheck(string, format)
const char * const string;
! const char * const format;
{
register char * fbuf;
register const char * fp;
--- 11,17 ----
char *
scheck(string, format)
const char * const string;
! char * const format;
{
register char * fbuf;
register const char * fp;
diff -r -c old/southamerica new/southamerica
*** old/southamerica Mon Jan 17 18:36:17 2005
--- new/southamerica Mon Jan 31 14:06:50 2005
***************
*** 1,4 ****
! # @(#)southamerica 7.57
# 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
--- 1,4 ----
! # @(#)southamerica 7.58
# 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
***************
*** 964,970 ****
#
# <a href="news:xrGmb.39935$gA1.13896113@news4.srv.hcvlny.cv.net">
# From Evelyn C. Leeper via Mark Brader (2003-10-26):</a>
! # When we were in Peru in 1985-1986, they apparently switched over
# sometime between December 29 and January 3 while we were on the Amazon.
#
# From Paul Eggert (2003-11-02):
--- 964,970 ----
#
# <a href="news:xrGmb.39935$gA1.13896113@news4.srv.hcvlny.cv.net">
# From Evelyn C. Leeper via Mark Brader (2003-10-26):</a>
! # When we were in Peru in 1985-1986, they apparently switched over
# sometime between December 29 and January 3 while we were on the Amazon.
#
# From Paul Eggert (2003-11-02):
diff -r -c old/strftime.c new/strftime.c
*** old/strftime.c Mon Jan 31 09:20:47 2005
--- new/strftime.c Mon Jan 31 14:06:50 2005
***************
*** 1,6 ****
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)strftime.c 7.74";
/*
** Based on the UCB version with the ID appearing below.
** This is ANSIish only when "multibyte character == plain character".
--- 1,6 ----
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)strftime.c 7.75";
/*
** Based on the UCB version with the ID appearing below.
** This is ANSIish only when "multibyte character == plain character".
***************
*** 19,25 ****
** duplicated in all such forms and that any documentation,
** advertising materials, and other materials related to such
** distribution and use acknowledge that the software was developed
! ** by the University of California, Berkeley. The name of the
** University may not be used to endorse or promote products derived
** from this software without specific prior written permission.
** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
--- 19,25 ----
** duplicated in all such forms and that any documentation,
** advertising materials, and other materials related to such
** distribution and use acknowledge that the software was developed
! ** by the University of California, Berkeley. The name of the
** University may not be used to endorse or promote products derived
** from this software without specific prior written permission.
** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
***************
*** 91,97 ****
** C99 requires this format.
** Previously this code used "%D %X", but we now conform to C99.
** Note that
! ** "%a %b %d %H:%M:%S %Y"
** is used by Solaris 2.3.
*/
"%a %b %e %T %Y",
--- 91,97 ----
** C99 requires this format.
** Previously this code used "%D %X", but we now conform to C99.
** Note that
! ** "%a %b %d %H:%M:%S %Y"
** is used by Solaris 2.3.
*/
"%a %b %e %T %Y",
***************
*** 108,114 ****
static char * _add P((const char *, char *, const char *));
static char * _conv P((int, const char *, char *, const char *));
! static char * _fmt P((const char *, const struct tm *, char *, const char
*, int *));
static char * _yconv P((int, int, int, int, char *, const char *));
extern char * tzname[];
--- 108,115 ----
static char * _add P((const char *, char *, const char *));
static char * _conv P((int, const char *, char *, const char *));
! static char * _fmt P((const char *, const struct tm *, char *, const char
*,
! int *));
static char * _yconv P((int, int, int, int, char *, const char *));
extern char * tzname[];
***************
*** 264,270 ****
** t->tm_hour % 12 : 12, 2, '
');
** ...and has been changed to the below to
** match SunOS 4.1.1 and Arnold Robbins'
! ** strftime version 3.0. That is, "%k" and
** "%l" have been swapped.
** (ado, 1993-05-24)
*/
--- 265,271 ----
** t->tm_hour % 12 : 12, 2, '
');
** ...and has been changed to the below to
** match SunOS 4.1.1 and Arnold Robbins'
! ** strftime version 3.0. That is, "%k" and
** "%l" have been swapped.
** (ado, 1993-05-24)
*/
***************
*** 284,290 ****
** _conv(t->tm_hour, 2, ' ');
** ...and has been changed to the below to
** match SunOS 4.1.1 and Arnold Robbin's
! ** strftime version 3.0. That is, "%k" and
** "%l" have been swapped.
** (ado, 1993-05-24)
*/
--- 285,291 ----
** _conv(t->tm_hour, 2, ' ');
** ...and has been changed to the below to
** match SunOS 4.1.1 and Arnold Robbin's
! ** strftime version 3.0. That is, "%k" and
** "%l" have been swapped.
** (ado, 1993-05-24)
*/
***************
*** 359,365 ****
case 'G': /* ISO 8601 year (four digits) */
case 'g': /* ISO 8601 year (two digits) */
/*
! ** From Arnold Robbins' strftime version 3.0: "the week number of the
** year (the first Monday as the first day of week 1) as a decimal number
** (01-53)."
** (ado, 1993-05-24)
--- 360,366 ----
case 'G': /* ISO 8601 year (four digits) */
case 'g': /* ISO 8601 year (two digits) */
/*
! ** From Arnold Robbins' strftime version 3.0: "the week number of the
** year (the first Monday as the first day of week 1) as a decimal number
** (01-53)."
** (ado, 1993-05-24)
***************
*** 372,378 ****
** might also contain days from the previous year and the week before week
** 01 of a year is the last week (52 or 53) of the previous year even if
** it contains days from the new year. A week starts with Monday (day 1)
! ** and ends with Sunday (day 7). For example, the first week of the year
** 1997 lasts from 1996-12-30 to 1997-01-05..."
** (ado, 1996-01-02)
*/
--- 373,379 ----
** might also contain days from the previous year and the week before week
** 01 of a year is the last week (52 or 53) of the previous year even if
** it contains days from the new year. A week starts with Monday (day 1)
! ** and ends with Sunday (day 7). For example, the first week of the year
** 1997 lasts from 1996-12-30 to 1997-01-05..."
** (ado, 1996-01-02)
*/
***************
*** 512,523 ****
/*
** C99 says that the UTC offset must
** be computed by looking only at
! ** tm_isdst. This requirement is
** incorrect, since it means the code
** must rely on magic (in this case
** altzone and timezone), and the
** magic might not have the correct
! ** offset. Doing things correctly is
** tricky and requires disobeying C99;
** see GNU C strftime for details.
** For now, punt and conform to the
--- 513,524 ----
/*
** C99 says that the UTC offset must
** be computed by looking only at
! ** tm_isdst. This requirement is
** incorrect, since it means the code
** must rely on magic (in this case
** altzone and timezone), and the
** magic might not have the correct
! ** offset. Doing things correctly is
** tricky and requires disobeying C99;
** see GNU C strftime for details.
** For now, punt and conform to the
***************
*** 559,565 ****
case '%':
/*
** X311J/88-090 (4.12.3.5): if conversion char is
! ** undefined, behavior is undefined. Print out the
** character itself as printf(3) also does.
*/
default:
--- 560,566 ----
case '%':
/*
** X311J/88-090 (4.12.3.5): if conversion char is
! ** undefined, behavior is undefined. Print out the
** character itself as printf(3) also does.
*/
default:
***************
*** 682,688 ****
** Slurp the locale file into the cache.
*/
namesize = strlen(name) + 1;
! if (sizeof filename <
((sizeof locale_home) + namesize + (sizeof lc_time)))
goto no_locale;
oldsun = 0;
--- 683,689 ----
** Slurp the locale file into the cache.
*/
namesize = strlen(name) + 1;
! if (sizeof filename <
((sizeof locale_home) + namesize + (sizeof lc_time)))
goto no_locale;
oldsun = 0;
***************
*** 705,711 ****
goto bad_locale;
bufsize = namesize + st.st_size;
locale_buf = NULL;
! lbuf = (lbuf == NULL) ? malloc(bufsize) : realloc(lbuf, bufsize);
if (lbuf == NULL)
goto bad_locale;
(void) strcpy(lbuf, name);
--- 706,712 ----
goto bad_locale;
bufsize = namesize + st.st_size;
locale_buf = NULL;
! lbuf = (lbuf == NULL) ? malloc(bufsize) : realloc(lbuf, bufsize);
if (lbuf == NULL)
goto bad_locale;
(void) strcpy(lbuf, name);
diff -r -c old/tz-art.htm new/tz-art.htm
*** old/tz-art.htm Mon Jan 31 09:20:48 2005
--- new/tz-art.htm Mon Jan 31 14:06:50 2005
***************
*** 1,5 ****
<?xml version="1.0" encoding="US-ASCII"?>
! <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
--- 1,5 ----
<?xml version="1.0" encoding="US-ASCII"?>
! <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
***************
*** 10,16 ****
<body>
<h1>Time and the Arts</h1>
<address>
! @(#)tz-art.htm 7.53
</address>
<p>
Please send corrections to this web page to the
--- 10,16 ----
<body>
<h1>Time and the Arts</h1>
<address>
! @(#)tz-art.htm 7.54
</address>
<p>
Please send corrections to this web page to the
diff -r -c old/tzfile.h new/tzfile.h
*** old/tzfile.h Mon Jan 31 09:19:08 2005
--- new/tzfile.h Mon Jan 31 14:06:49 2005
***************
*** 21,27 ****
#ifndef lint
#ifndef NOID
! static char tzfilehid[] = "@(#)tzfile.h 7.16";
#endif /* !defined NOID */
#endif /* !defined lint */
--- 21,27 ----
#ifndef lint
#ifndef NOID
! static char tzfilehid[] = "@(#)tzfile.h 7.17";
#endif /* !defined NOID */
#endif /* !defined lint */
***************
*** 48,54 ****
#define TZ_MAGIC "TZif"
struct tzhead {
! char tzh_magic[4]; /* TZ_MAGIC */
char tzh_reserved[16]; /* reserved for future use */
char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags
*/
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags
*/
--- 48,54 ----
#define TZ_MAGIC "TZif"
struct tzhead {
! char tzh_magic[4]; /* TZ_MAGIC */
char tzh_reserved[16]; /* reserved for future use */
char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags
*/
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags
*/
***************
*** 172,197 ****
#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400)
- #ifndef USG
-
- /*
- ** Use of the underscored variants may cause problems if you move your
code to
- ** certain System-V-based systems; for maximum portability, use the
- ** underscore-free variants. The underscored variants are provided for
- ** backward compatibility only; they may disappear from future versions of
- ** this file.
- */
-
- #define SECS_PER_MIN SECSPERMIN
- #define MINS_PER_HOUR MINSPERHOUR
- #define HOURS_PER_DAY HOURSPERDAY
- #define DAYS_PER_WEEK DAYSPERWEEK
- #define DAYS_PER_NYEAR DAYSPERNYEAR
- #define DAYS_PER_LYEAR DAYSPERLYEAR
- #define SECS_PER_HOUR SECSPERHOUR
- #define SECS_PER_DAY SECSPERDAY
- #define MONS_PER_YEAR MONSPERYEAR
-
- #endif /* !defined USG */
-
#endif /* !defined TZFILE_H */
--- 172,175 ----
diff -r -c old/workman.sh new/workman.sh
*** old/workman.sh Mon Jan 31 09:20:49 2005
--- new/workman.sh Mon Jan 31 14:06:50 2005
***************
*** 1,6 ****
#! /bin/sh
! # @(#)workman.sh 1.7
# Tell groff not to emit SGR escape sequences (ANSI color escapes).
GROFF_NO_SGR=1
--- 1,6 ----
#! /bin/sh
! # @(#)workman.sh 1.8
# Tell groff not to emit SGR escape sequences (ANSI color escapes).
GROFF_NO_SGR=1
***************
*** 26,29 ****
print "$_\n";
$didprint = 1;
}
! '
--- 26,29 ----
print "$_\n";
$didprint = 1;
}
! '
diff -r -c old/yearistype.sh new/yearistype.sh
*** old/yearistype.sh Mon Jan 17 18:36:18 2005
--- new/yearistype.sh Mon Jan 31 14:06:50 2005
***************
*** 1,6 ****
#! /bin/sh
! : '@(#)yearistype.sh 7.7'
case $#-$1 in
2-|2-0*|2-*[!0-9]*)
--- 1,6 ----
#! /bin/sh
! : '@(#)yearistype.sh 7.8'
case $#-$1 in
2-|2-0*|2-*[!0-9]*)
***************
*** 9,15 ****
esac
case $#-$2 in
! 2-even)
case $1 in
*[24680]) exit 0 ;;
*) exit 1 ;;
--- 9,15 ----
esac
case $#-$2 in
! 2-even)
case $1 in
*[24680]) exit 0 ;;
*) exit 1 ;;
***************
*** 19,25 ****
*[02468][048]|*[13579][26]) exit 1 ;;
*) exit 0 ;;
esac ;;
! 2-odd)
case $1 in
*[13579]) exit 0 ;;
*) exit 1 ;;
--- 19,25 ----
*[02468][048]|*[13579][26]) exit 1 ;;
*) exit 0 ;;
esac ;;
! 2-odd)
case $1 in
*[13579]) exit 0 ;;
*) exit 1 ;;
***************
*** 29,35 ****
*[02468][048]|*[13579][26]) exit 0 ;;
*) exit 1 ;;
esac ;;
! 2-*)
echo "$0: wild type - $2" >&2 ;;
esac
--- 29,35 ----
*[02468][048]|*[13579][26]) exit 0 ;;
*) exit 1 ;;
esac ;;
! 2-*)
echo "$0: wild type - $2" >&2 ;;
esac
diff -r -c old/zdump.c new/zdump.c
*** old/zdump.c Mon Jan 31 09:20:47 2005
--- new/zdump.c Mon Jan 31 14:20:42 2005
***************
*** 1,4 ****
! static char elsieid[] = "@(#)zdump.c 7.61";
/*
** This code has been made independent of the rest of the time
--- 1,4 ----
! static char elsieid[] = "@(#)zdump.c 7.63";
/*
** This code has been made independent of the rest of the time
***************
*** 215,221 ****
INITIALIZE(cutlotime);
INITIALIZE(cuthitime);
#if HAVE_GETTEXT
! (void) setlocale(LC_MESSAGES, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
#endif /* defined TEXTDOMAINDIR */
--- 215,221 ----
INITIALIZE(cutlotime);
INITIALIZE(cuthitime);
#if HAVE_GETTEXT
! (void) setlocale(LC_ALL, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
#endif /* defined TEXTDOMAINDIR */
***************
*** 318,324 ****
newtmp = localtime(&newt);
if (newtmp != NULL)
newtm = *newtmp;
! if ((tmp == NULL || newtmp == NULL) ? (tmp !=
newtmp) :
(delta(&newtm, &tm) != (newt - t) ||
newtm.tm_isdst != tm.tm_isdst ||
strcmp(abbr(&newtm), buf) != 0)) {
--- 318,324 ----
newtmp = localtime(&newt);
if (newtmp != NULL)
newtm = *newtmp;
! if ((tmp == NULL || newtmp == NULL) ? (tmp !=
newtmp) :
(delta(&newtm, &tm) != (newt - t) ||
newtm.tm_isdst != tm.tm_isdst ||
strcmp(abbr(&newtm), buf) != 0)) {
diff -r -c old/zic.c new/zic.c
*** old/zic.c Mon Jan 31 09:20:47 2005
--- new/zic.c Mon Jan 31 14:20:42 2005
***************
*** 1,4 ****
! static char elsieid[] = "@(#)zic.c 7.120";
/*
** Regardless of the type of time_t, we do our work using this type.
--- 1,4 ----
! static char elsieid[] = "@(#)zic.c 7.122";
/*
** Regardless of the type of time_t, we do our work using this type.
***************
*** 21,27 ****
/*
** On some ancient hosts, predicates like `isspace(C)' are defined
! ** only if isascii(C) || C == EOF. Modern hosts obey the C Standard,
** which says they are defined only if C == ((unsigned char) C) || C ==
EOF.
** Neither the C Standard nor Posix require that `isascii' exist.
** For portability, we check both ancient and modern requirements.
--- 21,27 ----
/*
** On some ancient hosts, predicates like `isspace(C)' are defined
! ** only if isascii(C) || C == EOF. Modern hosts obey the C Standard,
** which says they are defined only if C == ((unsigned char) C) || C ==
EOF.
** Neither the C Standard nor Posix require that `isascii' exist.
** For portability, we check both ancient and modern requirements.
***************
*** 138,146 ****
static void writezone P((const char * name));
static int yearistype P((int year, const char * type));
! #if !(HAVE_STRERROR - 0)
static char * strerror P((int));
! #endif /* !(HAVE_STRERROR - 0) */
static int charcnt;
static int errors;
--- 138,146 ----
static void writezone P((const char * name));
static int yearistype P((int year, const char * type));
! #if !HAVE_STRERROR
static char * strerror P((int));
! #endif /* !HAVE_STRERROR */
static int charcnt;
static int errors;
***************
*** 380,386 ****
** Error handling.
*/
! #if !(HAVE_STRERROR - 0)
static char *
strerror(errnum)
int errnum;
--- 380,386 ----
** Error handling.
*/
! #if !HAVE_STRERROR
static char *
strerror(errnum)
int errnum;
***************
*** 391,397 ****
return (errnum > 0 && errnum <= sys_nerr) ?
sys_errlist[errnum] : _("Unknown system error");
}
! #endif /* !(HAVE_STRERROR - 0) */
static void
eats(name, num, rname, rnum)
--- 391,397 ----
return (errnum > 0 && errnum <= sys_nerr) ?
sys_errlist[errnum] : _("Unknown system error");
}
! #endif /* !HAVE_STRERROR */
static void
eats(name, num, rname, rnum)
***************
*** 448,454 ****
static void
usage P((void))
{
! (void) fprintf(stderr, _("%s: usage is %s [ --version ] [ -s ] [ -v
] [ -l localtime ] [ -p posixrules ] \\\n\t[ -d directory ] [ -L leapseconds
] [ -y yearistype ] [ filename ... ]\n"),
progname, progname);
(void) exit(EXIT_FAILURE);
}
--- 448,456 ----
static void
usage P((void))
{
! (void) fprintf(stderr, _("%s: usage is %s \
! [ --version ] [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n\
! \t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ...
]\n"),
progname, progname);
(void) exit(EXIT_FAILURE);
}
***************
*** 472,484 ****
#ifdef unix
(void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
#endif /* defined unix */
! #if HAVE_GETTEXT - 0
! (void) setlocale(LC_MESSAGES, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
#endif /* defined TEXTDOMAINDIR */
(void) textdomain(TZ_DOMAIN);
! #endif /* HAVE_GETTEXT - 0 */
progname = argv[0];
for (i = 1; i < argc; ++i)
if (strcmp(argv[i], "--version") == 0) {
--- 474,486 ----
#ifdef unix
(void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
#endif /* defined unix */
! #if HAVE_GETTEXT
! (void) setlocale(LC_ALL, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
#endif /* defined TEXTDOMAINDIR */
(void) textdomain(TZ_DOMAIN);
! #endif /* HAVE_GETTEXT */
progname = argv[0];
for (i = 1; i < argc; ++i)
if (strcmp(argv[i], "--version") == 0) {
***************
*** 631,652 ****
(void) exit(EXIT_FAILURE);
result = link(fromname, toname);
! #if (HAVE_SYMLINK - 0)
if (result != 0 &&
! access(fromname, F_OK) == 0 &&
! !itsdir(fromname)) {
! const char *s = tofile;
! register char * symlinkcontents = NULL;
! while ((s = strchr(s+1, '/')) != NULL)
! symlinkcontents = ecatalloc(symlinkcontents,
"../");
! symlinkcontents = ecatalloc(symlinkcontents,
fromfile);
! result = symlink(symlinkcontents, toname);
! if (result == 0)
warning(_("hard link failed, symbolic link used"));
! ifree(symlinkcontents);
}
! #endif
if (result != 0) {
const char *e = strerror(errno);
--- 633,659 ----
(void) exit(EXIT_FAILURE);
result = link(fromname, toname);
! #if HAVE_SYMLINK
if (result != 0 &&
! access(fromname, F_OK) == 0 &&
! !itsdir(fromname)) {
! const char *s = tofile;
! register char * symlinkcontents = NULL;
! while ((s = strchr(s+1, '/')) != NULL)
! symlinkcontents =
! ecatalloc(symlinkcontents,
! "../");
! symlinkcontents =
! ecatalloc(symlinkcontents,
! fromfile);
! result = symlink(symlinkcontents,
! toname);
! if (result == 0)
warning(_("hard link failed, symbolic link used"));
! ifree(symlinkcontents);
}
! #endif /* HAVE_SYMLINK */
if (result != 0) {
const char *e = strerror(errno);
***************
*** 804,810 ****
*/
eat(zp->z_filename, zp->z_linenum);
zp->z_stdoff = gethms(zp->z_rule, _("unruly zone"),
! TRUE);
/*
** Note, though, that if there's no rule,
** a '%s' in the format is a bad thing.
--- 811,817 ----
*/
eat(zp->z_filename, zp->z_linenum);
zp->z_stdoff = gethms(zp->z_rule, _("unruly zone"),
! TRUE);
/*
** Note, though, that if there's no rule,
** a '%s' in the format is a bad thing.
***************
*** 1107,1113 ****
zones[nzones - 1].z_untiltime > min_time &&
zones[nzones - 1].z_untiltime < max_time &&
zones[nzones - 1].z_untiltime >= z.z_untiltime) {
! error(_("Zone continuation line end time is
not after end time of previous line"));
return FALSE;
}
}
--- 1114,1122 ----
zones[nzones - 1].z_untiltime > min_time &&
zones[nzones - 1].z_untiltime < max_time &&
zones[nzones - 1].z_untiltime >= z.z_untiltime) {
! error(_(
! "Zone continuation line end time is not after end time of previous line"
! ));
return FALSE;
}
}
***************
*** 1140,1150 ****
dayoff = 0;
cp = fields[LP_YEAR];
if (sscanf(cp, scheck(cp, "%d"), &year) != 1) {
! /*
! * Leapin' Lizards!
! */
! error(_("invalid leaping year"));
! return;
}
j = EPOCH_YEAR;
while (j != year) {
--- 1149,1159 ----
dayoff = 0;
cp = fields[LP_YEAR];
if (sscanf(cp, scheck(cp, "%d"), &year) != 1) {
! /*
! ** Leapin' Lizards!
! */
! error(_("invalid leaping year"));
! return;
}
j = EPOCH_YEAR;
while (j != year) {
***************
*** 1211,1217 ****
return;
}
if ((lp = byword(fields[LP_ROLL], leap_types)) == NULL) {
! error(_("illegal Rolling/Stationary field on Leap
line"));
return;
}
leapadd(tadd(t, tod), positive, lp->l_value, count);
--- 1220,1228 ----
return;
}
if ((lp = byword(fields[LP_ROLL], leap_types)) == NULL) {
! error(_(
! "illegal Rolling/Stationary field on Leap
line"
! ));
return;
}
leapadd(tadd(t, tod), positive, lp->l_value, count);
***************
*** 1473,1486 ****
while (fromi < timecnt && attypes[fromi].type == 0)
++fromi; /* handled by default rule
*/
for ( ; fromi < timecnt; ++fromi) {
! if (toi != 0
! && ((attypes[fromi].at
! + gmtoffs[attypes[toi - 1].type])
! <= (attypes[toi - 1].at
! + gmtoffs[toi == 1 ? 0
! : attypes[toi - 2].type]))) {
! attypes[toi - 1].type = attypes[fromi].type;
! continue;
}
if (toi == 0 ||
attypes[toi - 1].type !=
attypes[fromi].type)
--- 1484,1496 ----
while (fromi < timecnt && attypes[fromi].type == 0)
++fromi; /* handled by default rule
*/
for ( ; fromi < timecnt; ++fromi) {
! if (toi != 0 && ((attypes[fromi].at +
! gmtoffs[attypes[toi - 1].type]) <=
! (attypes[toi - 1].at + gmtoffs[toi == 1 ? 0
! : attypes[toi - 2].type]))) {
! attypes[toi - 1].type =
! attypes[fromi].type;
! continue;
}
if (toi == 0 ||
attypes[toi - 1].type !=
attypes[fromi].type)
***************
*** 1526,1532 ****
convert(eitol(typecnt), tzh.tzh_typecnt);
convert(eitol(charcnt), tzh.tzh_charcnt);
(void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
! #define DO(field) (void) fwrite((void *) tzh.field, (size_t) sizeof
tzh.field, (size_t) 1, fp)
DO(tzh_magic);
DO(tzh_reserved);
DO(tzh_ttisgmtcnt);
--- 1536,1543 ----
convert(eitol(typecnt), tzh.tzh_typecnt);
convert(eitol(charcnt), tzh.tzh_charcnt);
(void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
! #define DO(field) (void) fwrite((void *) tzh.field, \
! (size_t) sizeof tzh.field, (size_t) 1, fp)
DO(tzh_magic);
DO(tzh_reserved);
DO(tzh_ttisgmtcnt);
***************
*** 1745,1756 ****
continue;
}
if (*startbuf == '\0' &&
! startoff == oadd(zp->z_gmtoff,
! stdoff)) {
! doabbr(startbuf,
zp->z_format,
! rp->r_abbrvar,
! rp->r_stdoff != 0);
! }
}
eats(zp->z_filename, zp->z_linenum,
rp->r_filename, rp->r_linenum);
--- 1756,1768 ----
continue;
}
if (*startbuf == '\0' &&
! startoff ==
oadd(zp->z_gmtoff,
! stdoff))
! doabbr(startbuf,
!
zp->z_format,
!
rp->r_abbrvar,
! rp->r_stdoff
!=
! 0);
}
eats(zp->z_filename, zp->z_linenum,
rp->r_filename, rp->r_linenum);
***************
*** 2041,2047 ****
else while ((*dp = *cp++) != '"')
if (*dp != '\0')
++dp;
! else error(_("Odd number of quotation
marks"));
} while (*cp != '\0' && *cp != '#' &&
(!isascii(*cp) || !isspace((unsigned char) *cp)));
if (isascii(*cp) && isspace((unsigned char) *cp))
--- 2053,2061 ----
else while ((*dp = *cp++) != '"')
if (*dp != '\0')
++dp;
! else error(_(
! "Odd number of quotation
marks"
! ));
} while (*cp != '\0' && *cp != '#' &&
(!isascii(*cp) || !isspace((unsigned char) *cp)));
if (isascii(*cp) && isspace((unsigned char) *cp))
***************
*** 2162,2168 ****
}
if (i < 0 || i >= len_months[isleap(y)][m]) {
if (noise)
! warning(_("rule goes past start/end of
month--will not work with pre-2004 versions of zic"));
}
}
if (dayoff < 0 && !TYPE_SIGNED(zic_t))
--- 2176,2183 ----
}
if (i < 0 || i >= len_months[isleap(y)][m]) {
if (noise)
! warning(_("rule goes past start/end of
month--\
! will not work with pre-2004 versions of zic"));
}
}
if (dayoff < 0 && !TYPE_SIGNED(zic_t))
2
1
Paul Eggert wrote:
> However -- in case this comes up -- as far as I know we have never
> relied on their case-sensitivity, and there are no plans to do so.
...which is a good thing, given that in the Olson code they're file
names, and in OS X, which uses the Olson code, the files are probably
going to be stored on a case-insensitive HFS+ file system.
(Not that any good reason to rely on the case-sensitivity comes to mind
in any case.)
1
0
RE: FW: glibc, Linux: about the time zone transition values in th e lo calt ime file
by Fei Yuming-CYF001 Feb. 3, 2005
by Fei Yuming-CYF001 Feb. 3, 2005
Feb. 3, 2005
Thank you all for the responses.
Markus exactly explained the why.
(In my application, I needed to get the local-broken-down-time format
of the transition time point, but do NOT apply the STD/DST transition to it.
The one mentioned in my previous email is the result that the DST
transition has been applied to it, which was my fault. I figured out a
way to fix it and get the right result.)
Yuming
-----Original Message-----
From: Markus Kuhn [mailto:Markus.Kuhn@cl.cam.ac.uk]
Sent: Thursday, February 03, 2005 11:04 AM
To: Fei Yuming-CYF001
Cc: tz(a)elsie.nci.nih.gov
Subject: Re: FW: glibc, Linux: about the time zone transition values in
the lo calt ime file
"Olson, Arthur David (NIH/NCI)" wrote on 2005-02-03 13:57 UTC:
Fei Yuming <Yuming.Fei(a)motorola.com> wrote:
> On Linux systems, it seems that the transitions stored in the localtime file
> are not the current time to start the transition, but the new local current
> time right after the transition.
The following might help to clarify what I suspect you might got
confused about:
The transition times are stored in the "Seconds Since The Epoch
(time_t)" time scale, which itself (like UTC) has *no* DST transitions.
The effect you observed occured only *after* the application of the
time_t->local-broken-down-time conversion, which you applied to convert
the time_t value back into a human-consumable local-time yyyy-mm-dd
hh:mm:ss display.
It is only natural, that the transition time point itself is displayed
using the same convention as the time point immediately afterwards.
[By the way: This is for the same reason for which most digital clocks
show 00:00 and not 24:00 at the midnight transition. Note that 24:00
would be valid only for the infinitesimal point in time at exactly
midnight (and therefore invisible to the human eye), whereas 00:00 is a
valid truncation until 00:01 is reached. Therefore, we use the
backwards-looking notation 24:00 only when we refer to the end of a time
interval (as in tonight 22:00-24:00), but not when we refer to the
current time (as in "It is now 00:00.").]
Markus
--
Markus Kuhn, Computer Lab, Univ of Cambridge, GB
http://www.cl.cam.ac.uk/~mgk25/ | __oo_O..O_oo__
1
0
FW: glibc, Linux: about the time zone transition values in the lo calt ime file
by Olson, Arthur David (NIH/NCI) Feb. 3, 2005
by Olson, Arthur David (NIH/NCI) Feb. 3, 2005
Feb. 3, 2005
Yuming is not on the time zone mailing list; direct replies appropriately.
--ado
_____
From: Fei Yuming-CYF001 [mailto:Yuming.Fei@motorola.com]
Sent: Tuesday, February 01, 2005 4:14 PM
To: 'tz(a)elsie.nci.nih.gov'
Subject: glibc, Linux: about the time zone transition values in the localt
ime file
Dear Sir:
On Linux systems, it seems that the transitions stored in the localtime file
are not the current time to start the transition, but the new local current
time right after the transition.
For example, I have the glibc-2.2.5 library on my Linux 2.4.20 system, my
timezone is set to US/Central and my current time is in CST. The
/etc/localtime (or /usr/share/zoneinfo/US/Central) shows that in 2005, the
time to transfer into DST is 1112515200 seconds, i.e. Sun Apr 3 03:00:00
2005. (This can be got, e.g., by breaking into the
glibc-2.2.5/time/tzfile.c's __tzfile_read() function, and printing out the
transitions values, i.e. transitions[169] == 1112515200).
However, as we know, the transition to DST is Apr 3 02:00:00 --> Apr 3
03:00:00. The time after the transition (i.e. 03:00:00) instead of the
current time to start the transition (ie.. 02:00:00) has been stored in the
localtime file. Could you please let me know what the reason it is to do so
(i.e. why not storing 02:00:00)?
I will highly appreciate your help!
Yuming
2
1