All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: Fix timestamp value for RTC_TIMESTAMP_BEGIN_1900
@ 2019-03-22  7:26 Geert Uytterhoeven
  2019-03-24 13:25 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2019-03-22  7:26 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni
  Cc: linux-rtc, linux-kernel, Geert Uytterhoeven

Printing "mktime64(1900, 1, 1, 0, 0, 0)" gives -2208988800.

Fixes: 83bbc5ac63326433 ("rtc: Add useful timestamp definitions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 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 */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtc: Fix timestamp value for RTC_TIMESTAMP_BEGIN_1900
  2019-03-22  7:26 [PATCH] rtc: Fix timestamp value for RTC_TIMESTAMP_BEGIN_1900 Geert Uytterhoeven
@ 2019-03-24 13:25 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2019-03-24 13:25 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Alessandro Zummo, linux-rtc, linux-kernel

On 22/03/2019 08:26:12+0100, Geert Uytterhoeven wrote:
> Printing "mktime64(1900, 1, 1, 0, 0, 0)" gives -2208988800.
> 
> Fixes: 83bbc5ac63326433 ("rtc: Add useful timestamp definitions")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  include/linux/rtc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-24 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22  7:26 [PATCH] rtc: Fix timestamp value for RTC_TIMESTAMP_BEGIN_1900 Geert Uytterhoeven
2019-03-24 13:25 ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.