diff options
-rw-r--r-- | bin/date/date.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/date/date.c b/bin/date/date.c index 14b2b67..73a3790 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 ;-} */ |