summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd/dhcpd.h
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2013-04-17 19:26:11 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2013-04-17 19:26:11 +0000
commit157b6d8e95b98c322d0167bbbf7213f7b641e4d9 (patch)
tree874e309ef9024211a94664f26846722d2a6421e2 /usr.sbin/dhcpd/dhcpd.h
parent80973d7181c8efebe9f402c244e838138f1bf77c (diff)
Replace hand-rolled date printing/parsing code with strftime()/strptime().
Use timegm() because all the dates are in UTC and the 'standard' routines can't handle the truth. Remove some 'time_t is 32bits' assumptions. Print 'UTC' at the end of dates in the leases file, rather than mentioning that all dates are UTC in a comment at the top of the file. Feedback and suggestions from guenther@, kettenis@, otto@, tedu@, deraadt@.
Diffstat (limited to 'usr.sbin/dhcpd/dhcpd.h')
-rw-r--r--usr.sbin/dhcpd/dhcpd.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/dhcpd/dhcpd.h b/usr.sbin/dhcpd/dhcpd.h
index 125e71fbfb2..9c13aa803d8 100644
--- a/usr.sbin/dhcpd/dhcpd.h
+++ b/usr.sbin/dhcpd/dhcpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.h,v 1.46 2013/02/03 21:04:19 krw Exp $ */
+/* $OpenBSD: dhcpd.h,v 1.47 2013/04/17 19:26:10 krw Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 1998, 1999
@@ -74,6 +74,9 @@
#include "dhcp.h"
#include "tree.h"
+#define DB_TIMEFMT "%w %Y/%m/%d %T UTC"
+#define OLD_DB_TIMEFMT "%w %Y/%m/%d %T"
+
#define SERVER_PORT 67
#define CLIENT_PORT 68