From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Arnd Bergmann To: David Howells Cc: keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-security-module@vger.kernel.org, John Stultz Subject: Re: [PATCH 4/5] Handle both ISO 8601 encodings of midnight in mktime64() Date: Fri, 18 Dec 2015 10:11:47 +0100 Message-ID: <12108512.yf1y2YfOQx@wuerfel> In-Reply-To: <20151218000217.29483.43671.stgit@warthog.procyon.org.uk> References: <20151218000148.29483.67155.stgit@warthog.procyon.org.uk> <20151218000217.29483.43671.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: On Friday 18 December 2015 00:02:17 David Howells wrote: > ISO 8601 format dates permit two different encodings of midnight - 00:00:00 > and 24:00:00 - the first is midnight today and the second is midnight > tomorrow and is exactly equivalent to the first with tomorrow's date. > > Note that the implementation of mktime64() doesn't actually need to be > changed to handle this - the multiplication by 3600 of the hour will take > care of it automatically. However, we should document that this handling > is done in mktime64() and is thus in a common place in the kernel. > > This handling is required for X.509 certificate parsing which can be given > ISO 8601 dates. > > Signed-off-by: David Howells > cc: John Stultz > cc: Arnd Bergmann > cc: stable@vger.kernel.org > Acked-by: Arnd Bergmann