History log of /openbsd-current/usr.bin/at/parsetime.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.27 16-Feb-2019 naddy

When specifying the time in the form HHMM or HH:MM, if that time
is already past, the next day is assumed. Handle the case where
we're still in the same hour but the minutes are past.

ok deraadt@ millert@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.26 11-Nov-2015 millert

Use warn/warnx here too.


# 1.25 11-Nov-2015 millert

Remove bogus DST code. mktime() handles DST automatically when
tm_isdst is set to -1.


# 1.24 06-Nov-2015 millert

Use __progname instead of the homegrown ProgramName.


# 1.23 20-Aug-2015 deraadt

Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert


Revision tags: OPENBSD_5_8_BASE
# 1.22 17-Mar-2015 millert

Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@


# 1.21 15-Mar-2015 millert

tzfile.h is an internal header that should never have been installed.
What's worse, the tzfile.h that gets installed is over 20 years old
and doesn't match the real tzfile.h in libc/time. This makes the
tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE
define has been moved to time.h temporarily until its usage is
replaced by 1900 in the tree. Actual removal of tzfile.h is pending
a ports build. Based on a diff from deraadt@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE
# 1.20 13-Jan-2014 millert

Add the "next" keyword as an alias for "+ 1" for relative times.
Also support "months" and "years" keywords when specified as relative
time units. All as per POSIX. Man page changes OK jmc@ sobrado@


# 1.19 25-Nov-2013 deraadt

variety of unsigned char casts (or conversions) for ctype
ok krw


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.18 02-Jul-2010 krw

'wether' -> 'whether' typo in license text.

ok deraadt@


Revision tags: OPENBSD_4_7_BASE
# 1.17 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.16 23-May-2007 millert

Sanity check the time argument specified by the -t argument. Some
checks adapted from date(1). Now prevents scheduling jobs in the
past just like the standard (ie: not -n) at(1) date parsing.


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.15 26-Apr-2006 cloder

Cleanup, remove an unused var, use an int to store argc instead of a char,
makes lint a bit happier. OK deraadt


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.14 17-Jun-2004 millert

Remove trailing whitespace and, for printf, uid/gid are unsigned


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.13 20-Feb-2003 millert

Sync with ISC cron-current + my at(1) integration.
The at(1) code is now more tightly integrated into the cron codebase.


Revision tags: OPENBSD_3_2_BASE
# 1.12 14-Jun-2002 todd

spelling; from Brian Poole <raj@cerias.purdue.edu>


# 1.11 14-May-2002 millert

Major changes:

Job names are now "runtime.queue" where runtime is when the job will run
in Unix time format. This is what SysV at does and allows us to nuke
the .SEQ file.

Historic BSD options for atq and atrm are now implemented;
atq and atrm get their own man pages.

At no longer does anything with the -v flag. We print the execution
time when jobs are submitted so there is no need.

Most *scanf() usage is gone (one remains in atrun).

Better sanity checks in atrun.

Random style/cleanup.

With these changes we have the best of both worlds; POSIX compliance with
the traditional BSD features.


# 1.10 11-May-2002 millert

Pass -Wall and use ANSI function headers.


Revision tags: OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE
# 1.9 05-Jan-2000 millert

Y2K fix. at(1) would die with 'garbled time' when assign_date() was passed
a year > 99. This change fixes the conversion of 2-digit years into
tm_year format.


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE
# 1.8 21-Mar-1999 alex

PR 778: Handle 2-digit year values post-Y2K. Improvements to PR 778
provided by pjanzen.


Revision tags: OPENBSD_2_4_BASE
# 1.7 10-Jul-1998 deraadt

long month names; archie@whistle.com


# 1.6 09-Jul-1998 mickey

user err/warn; some -Wall


# 1.5 26-Jun-1998 millert

make 'now' work as a timespec


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.4 01-Mar-1997 millert

Merge in changes from at 2.9


Revision tags: OPENBSD_2_0_BASE
# 1.3 26-Jun-1996 deraadt

rcsid


# 1.2 02-Jan-1996 deraadt

got am/pm reversed when hour is 12; from Mark_Weaver@brown.edu; netbsd pr#1743


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.26 11-Nov-2015 millert

Use warn/warnx here too.


# 1.25 11-Nov-2015 millert

Remove bogus DST code. mktime() handles DST automatically when
tm_isdst is set to -1.


# 1.24 06-Nov-2015 millert

Use __progname instead of the homegrown ProgramName.


# 1.23 20-Aug-2015 deraadt

Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert


Revision tags: OPENBSD_5_8_BASE
# 1.22 17-Mar-2015 millert

Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@


# 1.21 15-Mar-2015 millert

tzfile.h is an internal header that should never have been installed.
What's worse, the tzfile.h that gets installed is over 20 years old
and doesn't match the real tzfile.h in libc/time. This makes the
tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE
define has been moved to time.h temporarily until its usage is
replaced by 1900 in the tree. Actual removal of tzfile.h is pending
a ports build. Based on a diff from deraadt@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE
# 1.20 13-Jan-2014 millert

Add the "next" keyword as an alias for "+ 1" for relative times.
Also support "months" and "years" keywords when specified as relative
time units. All as per POSIX. Man page changes OK jmc@ sobrado@


# 1.19 25-Nov-2013 deraadt

variety of unsigned char casts (or conversions) for ctype
ok krw


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.18 02-Jul-2010 krw

'wether' -> 'whether' typo in license text.

ok deraadt@


Revision tags: OPENBSD_4_7_BASE
# 1.17 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.16 23-May-2007 millert

Sanity check the time argument specified by the -t argument. Some
checks adapted from date(1). Now prevents scheduling jobs in the
past just like the standard (ie: not -n) at(1) date parsing.


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.15 26-Apr-2006 cloder

Cleanup, remove an unused var, use an int to store argc instead of a char,
makes lint a bit happier. OK deraadt


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.14 17-Jun-2004 millert

Remove trailing whitespace and, for printf, uid/gid are unsigned


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.13 20-Feb-2003 millert

Sync with ISC cron-current + my at(1) integration.
The at(1) code is now more tightly integrated into the cron codebase.


Revision tags: OPENBSD_3_2_BASE
# 1.12 14-Jun-2002 todd

spelling; from Brian Poole <raj@cerias.purdue.edu>


# 1.11 14-May-2002 millert

Major changes:

Job names are now "runtime.queue" where runtime is when the job will run
in Unix time format. This is what SysV at does and allows us to nuke
the .SEQ file.

Historic BSD options for atq and atrm are now implemented;
atq and atrm get their own man pages.

At no longer does anything with the -v flag. We print the execution
time when jobs are submitted so there is no need.

Most *scanf() usage is gone (one remains in atrun).

Better sanity checks in atrun.

Random style/cleanup.

With these changes we have the best of both worlds; POSIX compliance with
the traditional BSD features.


# 1.10 11-May-2002 millert

Pass -Wall and use ANSI function headers.


Revision tags: OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE
# 1.9 05-Jan-2000 millert

Y2K fix. at(1) would die with 'garbled time' when assign_date() was passed
a year > 99. This change fixes the conversion of 2-digit years into
tm_year format.


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE
# 1.8 21-Mar-1999 alex

PR 778: Handle 2-digit year values post-Y2K. Improvements to PR 778
provided by pjanzen.


Revision tags: OPENBSD_2_4_BASE
# 1.7 10-Jul-1998 deraadt

long month names; archie@whistle.com


# 1.6 09-Jul-1998 mickey

user err/warn; some -Wall


# 1.5 26-Jun-1998 millert

make 'now' work as a timespec


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.4 01-Mar-1997 millert

Merge in changes from at 2.9


Revision tags: OPENBSD_2_0_BASE
# 1.3 26-Jun-1996 deraadt

rcsid


# 1.2 02-Jan-1996 deraadt

got am/pm reversed when hour is 12; from Mark_Weaver@brown.edu; netbsd pr#1743


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision