Commit Graph

30 Commits

Author SHA1 Message Date
Peter Wemm 2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Martin Cracauer d430c0c167 Don't continue if parsing failed when -f is in use. Exit with nonzero value. 1999-06-25 09:04:48 +00:00
John-Mark Gurney 3bc1b1bb27 the month and three days are up for -hackers and the 24hrs for -committers.
add a -j flag that tells date not to try to set the date.  This allows you
to use date as a userland interface to strptime.

example:
TZ=GMT date -j -f "%a, %d %b %Y %T %Z" "Sun, 08 Nov 1998 02:22:20 GMT" +%s

which is the standard format for Last-modified headers in HTTP requests.

only one to respond: eivind
1999-05-14 00:28:41 +00:00
Brian Somers 269dfbee64 Support seconds with -v.
PR:		6308
Submitted by:	Max Euston <meuston@jmrodgers.com>
1999-03-09 09:38:54 +00:00
Alexander Langer f97fe12243 Added missing #include <string.h> 1998-10-03 16:29:59 +00:00
Philippe Charnier 574d120677 Restore Lite-2 sccsid. Restore include of sys/param.h. 1998-05-13 07:31:42 +00:00
Philippe Charnier cbf6f7d358 Correct use of .Nm and other cosmetics. Add rcsid. Remove unused #inc. 1998-05-06 06:51:42 +00:00
John Birrell c1e8822ae4 Cast a size_t to a long to avoid a gcc warning. 1998-01-25 08:59:08 +00:00
Brian Somers ad1c694bdc Put [+format] at the end of the usage message.
Make `date -?' output (pretty much) the same as
the man page
PR:		5269
1997-12-11 02:38:56 +00:00
Daniel O'Callaghan c5c1c13516 Back out suppress '\n' mod. 1997-10-03 12:54:30 +00:00
Daniel O'Callaghan 34de7199ea Add the '-s' flag to the usage string. 1997-10-01 05:44:35 +00:00
Daniel O'Callaghan 70a53cd743 Add the ability to supress the '\n' at the end of the date printed. 1997-10-01 05:24:08 +00:00
Joerg Wunsch adb7f7bca7 Fix the broken `date HHMM.SS' handling.
PR:		bin/4661
Submitted by:	blank@sliphost37.uni-trier.de (Sascha Blank)
1997-09-30 20:06:15 +00:00
Brian Somers 233d16da02 Remove forgotten debug statement. 1997-08-10 16:37:33 +00:00
Brian Somers 86a3e2a13a Add "-f fmt date" for specification of the
date using strptime(3).
Suggested by: Michael Smith <msmith@atrad.adelaide.edu.au>

Change mm & dd to MM & DD so that they don't
clash with the month.
1997-08-10 16:36:59 +00:00
Brian Somers 698f86e401 Change [-DMHW [+|-]val] to [-v [+|-]val[ymwdHM]]
Support Hours & Minutes
Add -Wall to Makefile
1997-08-09 22:34:06 +00:00
Brian Somers 7ca215a690 Add [-DWMY] flags for date adjustment.
Discussed with: freebsd-hackers
1997-08-04 03:37:07 +00:00
Philippe Charnier 749d4bb649 Cosmetic change in usage string. 1997-06-06 06:40:06 +00:00
Daniel O'Callaghan ec50d24e74 Fix typo in comment; Document in an example that years beyond 1999
are handled; fix typo in same example.
1997-04-16 05:59:21 +00:00
Warner Losh 93ef08af3e compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-28 15:24:41 +00:00
Peter Wemm b97fa2ef50 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
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.
1997-01-14 07:20:47 +00:00
Steve Price 42dbcdca0f Merge Lite2 mods, fix incorrect default string, cleanup
use of .Nm macros, and -Wall cleaning.
1996-12-14 05:54:15 +00:00
Andrey A. Chernov 008ff22c41 For nonexisten time use proper diagnostic instead of bad format and usage 1996-04-06 01:42:09 +00:00
Andrey A. Chernov 4d279a0648 Add setlocale(LC_TIME,... 1995-10-23 20:26:53 +00:00
Andrey A. Chernov 76f9ae3bfe Use %+ to print data using LC_TIME 1995-08-05 23:08:17 +00:00
Joerg Wunsch 29c52ddd49 date(1) didn't emit a final newline if the format had been specified
with `+'.  This breaks tradition and violates Posix 1003.2.

Discoverd by: luigi@labinfo.iet.unipi.it (Luigi Rizzo)
1995-04-03 20:08:33 +00:00
Bruce Evans abdf111953 Obtained from: partly from 386BSD-0.1.2.4
Fix several bugs involving the obsolescent -d and -t options:
-d 0 and -t 0 were ignored
-t -600 was a usage error
-d 'atoi is not suitable for parsing args' and -t duh were not usage errors

Change some error messages to say which call to settimeofday failed.

Restore casts of NULL in function calls.

Finish conversion to using err() instead of perror().
1994-12-26 12:59:28 +00:00
David Greenman 89730b290a Added $Id$ 1994-09-24 02:59:15 +00:00
Rodney W. Grimes 4b88c807ea BSD 4.4 Lite bin Sources 1994-05-26 06:18:55 +00:00