From: Mika Laitio Date: Fri, 10 Dec 2010 16:16:30 +0000 (+0200) Subject: Year fix when for Date function. X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9c47855d3ddc3d09b9733c43d420a7d5b739bd37;p=lib1wire.git 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 --- 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;