From 9c47855d3ddc3d09b9733c43d420a7d5b739bd37 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Fri, 10 Dec 2010 18:16:30 +0200 Subject: [PATCH] Year fix when for Date function. time-function return years since 1900, so add 1900 to years in Date function constructor. Signed-off-by: Mika Laitio --- src/Date.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Date.cc b/src/Date.cc index b00d8a7..b8b5714 100644 --- a/src/Date.cc +++ b/src/Date.cc @@ -26,7 +26,7 @@ Date::Date() { time(&wtime); ltime = localtime(&wtime); - year = ltime->tm_year; + year = 1900 + ltime->tm_year; month = ltime->tm_mon; day = ltime->tm_mday; hour = ltime->tm_hour; -- 2.41.1