Jim Meyering 6e5149f0ab 1997-01-06 Paul Eggert <eggert@twinsun.com>
* getdate.y: Rewrite to use mktime.

<sys/timeb.h>: Don't include.
(mktime): Declare.

(struct timeb, timezone, DOOMSDAY, SECSPERDAY, DSTMODE, yyDSTmode,
ToSeconds, Convert, DSTcorrect, RelativeDate, RelativeMonth): Remove.
(ToHour): New function (part of the old ToSeconds fn).
(ToYear): New function (part of the old Convert fn).

(TABLE.value, yyDayOrdinal, yyDayNumber, yyTimezone, yyDay, yyHour,
yyMinutes, yyMonth, yySeconds, yyYear, yyRelMonth, yyRelSeconds,
Number): Now int instead of time_t.
(HOUR): Don't cast to time_t.

(tDAY_UNIT, tHOUR_UNIT, tYEAR_UNIT): New %tokens.
(UnitsTable): Use new units that are closer to the keywords.

(yyRelDay, yyRelHour, yyRelMinutes, yyRelYear): New variables.
(rel, relunit, get_date): Add support for them.

(time): Fix timezone calculations for negative half-hour offsets
when integer division truncates towards minus infinity.

(zone): Incorporiate DST calculation directly.

(get_date): 2nd arg is now time_t *, not struct timeb *.
Use mktime to do most of the work, instead of computing it ourselves.
Guard against falsely reporting errors near the time_t boundaries
when parsing times in other time zones.
1997-01-18 15:32:16 +00:00
1997-01-03 05:10:19 +00:00
.
1997-01-17 03:01:15 +00:00
1996-09-22 14:30:37 +00:00
.
1997-01-13 04:23:05 +00:00
.
1996-12-31 16:18:06 +00:00
.
1996-03-24 18:49:38 +00:00
.
1996-04-24 02:34:42 +00:00
.
1997-01-05 03:19:46 +00:00
S
Description
No description provided
52 MiB
Languages
C 56.8%
Shell 27.4%
Perl 11.5%
Makefile 2.2%
M4 0.9%
Other 1.2%