From patchwork Fri Mar 22 07:26:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 1060953 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-rtc-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44QbVg5Kwsz9sRf for ; Fri, 22 Mar 2019 18:52:59 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726029AbfCVHw5 (ORCPT ); Fri, 22 Mar 2019 03:52:57 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:58672 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725998AbfCVHw5 (ORCPT ); Fri, 22 Mar 2019 03:52:57 -0400 Received: from ramsan ([84.194.111.163]) by albert.telenet-ops.be with bizsmtp id qvsu1z00W3XaVaC06vsu3Z; Fri, 22 Mar 2019 08:52:55 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1h7Ez0-00078P-JK; Fri, 22 Mar 2019 08:52:54 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1h7EZB-0007CU-G7; Fri, 22 Mar 2019 08:26:13 +0100 From: Geert Uytterhoeven To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] rtc: Fix timestamp value for RTC_TIMESTAMP_BEGIN_1900 Date: Fri, 22 Mar 2019 08:26:12 +0100 Message-Id: <20190322072612.27637-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-rtc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org Printing "mktime64(1900, 1, 1, 0, 0, 0)" gives -2208988800. Fixes: 83bbc5ac63326433 ("rtc: Add useful timestamp definitions") Signed-off-by: Geert Uytterhoeven --- include/linux/rtc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 588120ba372cda57..f3553b7da4d0bd20 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -162,7 +162,7 @@ struct rtc_device { #define to_rtc_device(d) container_of(d, struct rtc_device, dev) /* useful timestamps */ -#define RTC_TIMESTAMP_BEGIN_1900 -2208989361LL /* 1900-01-01 00:00:00 */ +#define RTC_TIMESTAMP_BEGIN_1900 -2208988800LL /* 1900-01-01 00:00:00 */ #define RTC_TIMESTAMP_BEGIN_2000 946684800LL /* 2000-01-01 00:00:00 */ #define RTC_TIMESTAMP_END_2099 4102444799LL /* 2099-12-31 23:59:59 */ #define RTC_TIMESTAMP_END_9999 253402300799LL /* 9999-12-31 23:59:59 */