Fix the broken `date HHMM.SS' handling.
PR: bin/4661 Submitted by: blank@sliphost37.uni-trier.de (Sascha Blank)
This commit is contained in:
parent
456ad1e5b4
commit
adb7f7bca7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30013
@ -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 ;-} */
|
||||
|
Loading…
Reference in New Issue
Block a user