aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1997-09-30 20:06:15 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1997-09-30 20:06:15 +0000
commitadb7f7bca71b0c17c796bd8983cb8f00b3ded85d (patch)
tree79836ecdf2be319c6d361831cd05052ac5357c8f
parent456ad1e5b4cece982582e144d0c2280fc30326f1 (diff)
Notes
-rw-r--r--bin/date/date.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/date/date.c b/bin/date/date.c
index 14b2b671b9cdc..73a379064d1da 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: date.c,v 1.16 1997/08/10 16:36:59 brian Exp $
+ * $Id: date.c,v 1.17 1997/08/10 16:37:33 brian Exp $
*/
#ifndef lint
@@ -213,7 +213,8 @@ setthetime(fmt, p)
} else
lt->tm_sec = 0;
- switch (strlen(p)) {
+ /* if p has a ".ss" field then let's pretend it's not there */
+ switch (strlen(p) - ((dot != NULL) ? 3 : 0)) {
case 10: /* yy */
lt->tm_year = ATOI2(p);
if (lt->tm_year < 69) /* hack for 2000 ;-} */