=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/touch/touch.c,v retrieving revision 1.18 retrieving revision 1.19 diff -c -r1.18 -r1.19 *** src/usr.bin/touch/touch.c 2011/08/20 06:44:24 1.18 --- src/usr.bin/touch/touch.c 2011/08/21 20:55:23 1.19 *************** *** 1,4 **** ! /* $OpenBSD: touch.c,v 1.18 2011/08/20 06:44:24 guenther Exp $ */ /* $NetBSD: touch.c,v 1.11 1995/08/31 22:10:06 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: touch.c,v 1.19 2011/08/21 20:55:23 guenther Exp $ */ /* $NetBSD: touch.c,v 1.11 1995/08/31 22:10:06 jtc Exp $ */ /* *************** *** 156,162 **** int yearset; char *dot, *p; /* Start with the current time. */ ! tmptime = tsp[0].tv_sec; if ((lt = localtime(&tmptime)) == NULL) err(1, "localtime"); /* [[CC]YY]MMDDhhmm[.SS] */ --- 156,162 ---- int yearset; char *dot, *p; /* Start with the current time. */ ! tmptime = time(NULL); if ((lt = localtime(&tmptime)) == NULL) err(1, "localtime"); /* [[CC]YY]MMDDhhmm[.SS] */ *************** *** 227,233 **** struct tm *lt; time_t tmptime; /* Start with the current time. */ ! tmptime = tsp[0].tv_sec; if ((lt = localtime(&tmptime)) == NULL) err(1, "localtime"); --- 227,233 ---- struct tm *lt; time_t tmptime; /* Start with the current time. */ ! tmptime = time(NULL); if ((lt = localtime(&tmptime)) == NULL) err(1, "localtime");