summaryrefslogtreecommitdiffstats
path: root/usr.bin/at/parsetime.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow time offsets to be negative, e.g. `at 1530 - 15 minutes`.cracauer2012-10-051-13/+49
| | | | | | | | This is useful if you have been given some time for some event in some format and you want your computer to do something to prepare for it. Without having to do time arithmetic in a shellscript. The syntax matches what the at(1) usually used on Linux supports.
* Add missing static keywords to at(1).ed2011-11-061-1/+1
| | | | | | While there, tidy up the privs.h part, where at.c has to #define to declare some globals. Also group static and non-static global variables in at.c.
* While revision 1.26 fixed the code to really subtract 3600 due tostefanf2005-08-181-3/+1
| | | | | daylight-saving, this was actually wrong because mktime() already does that for us.
* Don't throw away the adjusted `runtimer' value.stefanf2005-08-051-3/+1
|
* Style improvements recommended by Bruce as a follow up to somedwmalone2001-12-101-1/+0
| | | | | | | | of the recent WARNS commits. The idea is: 1) FreeBSD id tags should follow vendor tags. 2) Vendor tags should not be compiled (though copyrights probably should). 3) There should be no blank line between including cdefs and __FBSDIF.
* Use __FBSDID()markm2001-12-021-4/+3
|
* WARNS=2 fixup.markm2001-12-021-3/+4
|
* Allow an ``at now'' specification.brian2001-11-241-1/+5
| | | | | | PR: 32242 Submitted by: Alan E <alane@geeksrus.net> MFC after: 3 weeks
* Expland `mymalloc' with malloc + error checking.obrien2001-07-241-1/+2
|
* Y2K fix. at(1) would die with 'garbled time' when assign_date() wassheldonh2000-03-271-20/+22
| | | | | | | | | | | | | pased a year > 99. This change fixes the conversion of 2-digit years into tm_year format. This change is differs from the OpenBSD fix because of differences in our assign_date(). PR: 15872 Reported by: "Crist J. Clark" <cjclark@home.com> Submitted by: "Sergey N. Voronkov" <serg@dor.zaural.ru> Obtained from: OpenBSD
* Correct use of .Nm, .Em, .Evcharnier1999-12-051-10/+11
| | | | | Add rcsid. Use errx instead of fprintf + exit. Various spelling fixes.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* 1. Add support for months and years in relative time spec (now + 1 year)nsayer1999-08-261-50/+31
| | | | | | | 2. Rip out dateadd() and re-do the plus operator handler to use mktime() instead (per wollman). Reviewed by: wollman
* Eliminate compiler warnings from -Wallarchie1998-12-061-2/+3
|
* Typo fix: garbeld -> garbledsteve1998-08-301-2/+2
| | | | | PR: 7784 Submitted by: Kris Kennaway <kkennawa@physics.adelaide.edu.au>
* Year is sometimes set to -1 when assign_date() is called. Check for -1alex1998-08-081-2/+2
| | | | | | before Y2K processing. PR: 7524
* Recognize long month names in addition to short ones.des1998-07-091-1/+13
| | | | | PR: bin/7228 Submitted by: Archie Cobbs <archie@whistle.com>
* Permit double digit year values to be used in the next millenium.alex1998-05-051-1/+17
|
* Revert part of previous commit. I didn't see rcsid string in the middle ofcharnier1997-06-241-4/+2
| | | | the file. Put includes in alphabetical order.
* Use err(3).charnier1997-06-231-4/+7
| | | | Simplification: if(a == 12) a -= 12 -> if(a == 12) a = 0.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix botches in the handling of "AM" and "PM":jdp1996-07-191-3/+8
| | | | | 12:xx PM is 12:xx, not 24:xx. 12:xx AM is 00:xx, not 12:xx.
* Upgrade to 2.9ache1995-08-211-16/+16
|
* Make parsetime.c more consistent by using the (already declared) enumjoerg1995-06-241-10/+10
| | | | | | | | | | type instead of int all over the place. (Cosmetic, enhances debugging.) Point out that a date specification _must_ follow the time of day spec, in the man page. This clarifies the last point PR # of bin/483: "at doesn't seem to ..." (the remainder has already been fixed with version 1.3 of parsetime.c).
* Remove trailing whitespace.rgrimes1995-05-301-4/+4
|
* Upgrade.ache1995-04-121-110/+134
|
* Fix off by one error in calculation of `mday' (months start at 1).bde1995-01-311-2/+2
| | | | Jan 31 gave Jan 30, often for next year.
* Added at/atrm/atq/batch from Linux as hacked by Chris Demetriou.nate1994-01-051-0/+591
OpenPOWER on IntegriCloud