%{
-/* $OpenBSD: date.y,v 1.20 2010/07/23 21:46:05 ray Exp $ */
+/* $OpenBSD: date.y,v 1.21 2010/07/29 18:52:45 ray Exp $ */
/*
** Originally written by Steven M. Bellovin <smb@research.att.com> while
if (time(&nowtime) == -1 || !gmtime_r(&nowtime, &gmt) ||
!localtime_r(&nowtime, &tm))
- fatal("date_parse failed");
+ return -1;
tz = difftm(&gmt, &tm) / 60;
%{
-/* $OpenBSD: date.y,v 1.8 2010/07/23 21:46:05 ray Exp $ */
+/* $OpenBSD: date.y,v 1.9 2010/07/29 18:52:45 ray Exp $ */
/*
** Originally written by Steven M. Bellovin <smb@research.att.com> while
Hours = 0;
return ((Hours + 12) * 60L + Minutes) * 60L + Seconds;
default:
- abort();
+ return (-1);
}
/* NOTREACHED */
}
if (time(&nowtime) == -1 || !gmtime_r(&nowtime, &gmt) ||
!localtime_r(&nowtime, &tm))
- errx(1, "date_parse failed");
+ return -1;
tz = difftm(&gmt, &tm) / 60;