Mercurial > hg > octave-lojdl > gnulib-hg
changeset 6755:ac1a29f7e8d8
* getdate.y (get_date): When adding relative date, start with the
initial time, not with the result of the first mktime call.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 25 Apr 2006 10:30:13 +0000 |
parents | 2d6f12d56d54 |
children | 4d481eff340f |
files | lib/ChangeLog lib/getdate.y |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2006-04-25 Paul Eggert <eggert@cs.ucla.edu> + + * getdate.y (get_date): When adding relative date, start with the + initial time, not with the result of the first mktime call. + 2006-04-23 Bruno Haible <bruno@clisp.org> * copy-file.c: Include <unistd.h> unconditionally.
--- a/lib/getdate.y +++ b/lib/getdate.y @@ -1,7 +1,7 @@ %{ /* Parse a string into an internal time stamp. - Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Free Software + Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -1437,6 +1437,10 @@ tm.tm_year = year; tm.tm_mon = month; tm.tm_mday = day; + tm.tm_hour = tm0.tm_hour; + tm.tm_min = tm0.tm_min; + tm.tm_sec = tm0.tm_sec; + tm.tm_isdst = tm0.tm_isdst; Start = mktime (&tm); if (Start == (time_t) -1) goto fail;