projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug #739: install target now depends on all to avoid problem on
[mmh]
/
sbr
/
dtime.c
diff --git
a/sbr/dtime.c
b/sbr/dtime.c
index
8de4b69
..
e485dfd
100644
(file)
--- a/
sbr/dtime.c
+++ b/
sbr/dtime.c
@@
-3,6
+3,10
@@
* dtime.c -- time/date routines
*
* $Id$
* dtime.c -- time/date routines
*
* $Id$
+ *
+ * This code is Copyright (c) 2002, by the authors of nmh. See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
*/
#include <h/mh.h> /* for snprintf() */
*/
#include <h/mh.h> /* for snprintf() */
@@
-376,10
+380,10
@@
dtimezone (int offset, int flags)
#endif
}
#endif
}
-#if defined(DSTXXX)
+#ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
if (flags & TW_DST)
hours += 1;
if (flags & TW_DST)
hours += 1;
-#endif /* defined(DSTXXX) */
+#endif /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
snprintf (buffer, sizeof(buffer), "%s%02d%02d",
offset < 0 ? "-" : "+", abs (hours), abs (mins));
return buffer;
snprintf (buffer, sizeof(buffer), "%s%02d%02d",
offset < 0 ? "-" : "+", abs (hours), abs (mins));
return buffer;
@@
-412,8
+416,11
@@
dmktime (struct tws *tw)
year = tw->tw_year;
result = 0;
year = tw->tw_year;
result = 0;
- if (year < 100)
- year += 1900;
+ if (year < 1970)
+ year += 1900;
+
+ if (year < 1970)
+ year += 100;
for (i = 1970; i < year; i++)
result += dysize (i);
for (i = 1970; i < year; i++)
result += dysize (i);