Received: from mx.pao1.isc.org (mx.pao1.isc.org [149.20.64.53]) by bugs.isc.org (Postfix) with ESMTP id 18F1220EE26D for ; Mon, 20 Jun 2011 21:41:11 +0000 (UTC) Received: from bikeshed.isc.org (bikeshed.isc.org [IPv6:2001:4f8:3:d::19]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "bikeshed.isc.org", Issuer "ISC CA" (verified OK)) by mx.pao1.isc.org (Postfix) with ESMTPS id 9CB9DC9527 for ; Mon, 20 Jun 2011 21:41:08 +0000 (UTC) (envelope-from each@isc.org) Received: by bikeshed.isc.org (Postfix, from userid 10292) id 8E661216C81; Mon, 20 Jun 2011 21:41:08 +0000 (UTC) Delivered-To: bind-suggest@bugs.isc.org User-Agent: Mutt/1.4.2.3i MIME-Version: 1.0 Subject: date-format serial numbers (YYYYMMDDNN) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.1 Return-Path: X-Original-To: bind-suggest@bugs.isc.org Content-Disposition: inline Date: Mon, 20 Jun 2011 21:41:08 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mx.pao1.isc.org content-type: text/plain; charset="utf-8" Message-ID: <20110620214108.GA78640@isc.org> To: bind-suggest@isc.org From: Evan Hunt X-RT-Original-Encoding: us-ascii Content-Length: 1080 dnssec-signzone can generate a serial number in "unixtime" format (number of seconds since UNIX epoch). In RT #23849 we're adding this ability to named for DDNS updates as well. But neither one can generate serial numbers in the human-readable date format that's in common use: YYYYMMDDNN (where the Ys represent a four-digit year, Ms a two-digit month, Ds a two-digit day, and Ns a two-digit intraday serial number). That's a feature I've wanted for a long time, and I think it would be used by quite a few people if it were an option. Essentially, the algorithm would be: if (year * 1000000 + month * 10000 + day * 100 > current_serial + 1) serial = year * 1000000 + month * 10000 + day * 100; else serial = current_serial + 1; (Note: The above assumes serial-number arithmetic is used for the comparison.) If the zone was updated more than one hundred times in a day, then the serial number would just have to be incremented by one; this could result in the date as depicted in the serial number being "wrong", but would be otherwise harmless.