From: David Hankins Date: Thu, 22 Jan 2009 21:22:42 +0000 (+0000) Subject: - The db-time-format option was documented in manpages. [no ticket] X-Git-Tag: v4_2_0a1~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64e1823d54ef45529084f1221eab2a6341ce4945;p=thirdparty%2Fdhcp.git - The db-time-format option was documented in manpages. [no ticket] --- diff --git a/RELNOTES b/RELNOTES index 935925563..e4c4b21bf 100644 --- a/RELNOTES +++ b/RELNOTES @@ -61,6 +61,8 @@ work on other platforms. Please report any problems and suggested fixes to AC_USE_SYSTME_EXTENSIONS. The second is to deal with return values that were being ignored. +- The db-time-format option was documented in manpages. + Changes since 4.1.0b1 - A missing "else" in dhcrelay.c could have caused an interface not to diff --git a/client/dhclient.conf.5 b/client/dhclient.conf.5 index 01397d346..b14533098 100644 --- a/client/dhclient.conf.5 +++ b/client/dhclient.conf.5 @@ -1,4 +1,4 @@ -.\" $Id: dhclient.conf.5,v 1.22 2008/03/07 18:58:29 dhankins Exp $ +.\" $Id: dhclient.conf.5,v 1.23 2009/01/22 21:22:42 dhankins Exp $ .\" .\" Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC") .\" Copyright (c) 1996-2003 by Internet Software Consortium @@ -499,7 +499,11 @@ DHCP client, but must also be configured in predefined leases - a predefined lease whose expiry time has passed will not be used by the DHCP client. .PP -Dates are specified as follows: +Dates are specified in one of two ways. The software will output times in +these two formats depending on if the \fBdb-time-format\fR configuration +parameter has been set to \fIdefault\fR or \fIlocal\fR. +.PP +If it is set to \fIdefault\fR, then \fIdate\fR values appear as follows: .PP \fI \fB/\fI\fB/\fI \fB:\fI\fB:\fI\fR @@ -513,6 +517,25 @@ month is specified as a number starting with 1 for January. The day of the month is likewise specified starting with 1. The hour is a number between 0 and 23, the minute a number between 0 and 59, and the second also a number between 0 and 59. +.PP +If the \fBdb-time-format\fR configuration was set to \fIlocal\fR, then +the \fIdate\fR values appear as follows: +.PP + \fBepoch\fR \fI\fR\fB; #\fR \fI + \fR\fB:\fR\fI\fR\fB:\fR\fI \fR +.PP +The \fIseconds-since-epoch\fR is as according to the system's local clock (often +referred to as "unix time"). The \fB#\fR symbol supplies a comment that +describes what actual time this is as according to the system's configured +timezone, at the time the value was written. It is provided only for human +inspection, the epoch time is the only recommended value for machine +inspection. +.PP +Note that when defining a static lease, one may use either time format one +wishes, and need not include the comment or values after it. +.PP +If the time is infinite in duration, then the \fIdate\fR is \fBnever\fR +instead of an actual date. .SH ALIAS DECLARATIONS \fBalias { \fI declarations ... \fB}\fR .PP @@ -534,6 +557,15 @@ declaration for the IP alias address, and a subnet-mask option declaration. A medium statement should never be included in an alias declaration. .SH OTHER DECLARATIONS + \fBdb-time-format\fR [ \fIdefault\fR | \fIlocal\fR ] \fB;\fR +.PP +The \fBdb-time-format\fR option determines which of two output methods are +used for printing times in leases files. The \fIdefault\fR format provides +day-and-time in UTC, whereas \fIlocal\fR uses a seconds-since-epoch to store +the time value, and helpfully places a local timezone time in a comment on +the same line. The formats are described in detail in this manpage, whithin +the LEASE DECLARATIONS section. +.PP \fBreject \fIcidr-ip-address\fR [\fB,\fR \fI...\fB \fIcidr-ip-address\fR ] \fB;\fR .PP The diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5 index 4615227b3..78325850d 100644 --- a/server/dhcpd.conf.5 +++ b/server/dhcpd.conf.5 @@ -28,7 +28,7 @@ .\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see .\" ``http://www.nominum.com''. .\" -.\" $Id: dhcpd.conf.5,v 1.99 2008/11/03 18:13:58 dhankins Exp $ +.\" $Id: dhcpd.conf.5,v 1.100 2009/01/22 21:22:42 dhankins Exp $ .\" .TH dhcpd.conf 5 .SH NAME @@ -1990,6 +1990,19 @@ addresses, as long as those addresses are not restricted by and \fIdeny\fR statements within their \fIpool\fR declarations. .RE .PP +The \fIdb-time-format\fR statement +.RS 0.25i +.PP +.B db-time-format \fR[ \fIdefault\fR | \fIlocal\fR ] \fB;\fR +.PP +The DHCP server software outputs several timestamps when writing leases to +persistent storage. This configuration parameter selects one of two output +formats. The \fIdefault\fR format prints the day, date, and time in UTC, +while the \fIlocal\fR format prints the system seconds-since-epoch, and +helpfully provides the day and time in the system timezone in a comment. +The time formats are described in detail in the dhcpd.leases(5) manpage. +.RE +.PP The \fIddns-hostname\fR statement .RS 0.25i .PP diff --git a/server/dhcpd.leases.5 b/server/dhcpd.leases.5 index 99551cd7c..37c992c22 100644 --- a/server/dhcpd.leases.5 +++ b/server/dhcpd.leases.5 @@ -28,7 +28,7 @@ .\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see .\" ``http://www.nominum.com''. .\" -.\" $Id: dhcpd.leases.5,v 1.12 2008/11/20 15:18:28 jreed Exp $ +.\" $Id: dhcpd.leases.5,v 1.13 2009/01/22 21:22:42 dhankins Exp $ .\" .TH dhcpd.leases 5 .SH NAME @@ -107,7 +107,10 @@ the lease expiry time that the peer has acknowledged. The \fBatsfp\fR statement is the actual time sent from the failover partner. The \fBcltt\fR statement is the client's last transaction time. -The \fIdate\fR is specified as follows: +.PP +The \fIdate\fR is specified in two ways, depending on the configuration +value for the \fBdb-time-format\fR parameter. If it was set to \fIdefault\fR, +then the \fIdate\fR fields appear as follows: .PP .I weekday year\fB/\fImonth\fB/\fIday hour\fB:\fIminute\fB:\fIsecond\fR .PP @@ -127,6 +130,18 @@ times recorded on a lease are always the same as wall clock times. On most unix machines, you can display the current time in UTC by typing \fBdate -u\fR. .PP +If the \fBdb-time-format\fR was configured to \fIlocal\fR, then +the \fIdate\fR fields appear as follows: +.PP + \fBepoch\fR \fI\fR\fB; #\fR \fI + \fR\fB:\fR\fI\fR\fB:\fR\fI \fR +.PP +The \fIseconds-since-epoch\fR is as according to the system's local clock (often +referred to as "unix time"). The \fB#\fR symbol supplies a comment that +describes what actual time this is as according to the system's configured +timezone, at the time the value was written. It is provided only for human +inspection. +.PP If a lease will never expire, \fIdate\fR is \fBnever\fR instead of an actual date. .PP