[gnote] Convert struct tm.tm_year into actual year
- From: Debarshi Ray <debarshir src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnote] Convert struct tm.tm_year into actual year
- Date: Mon, 28 Dec 2009 11:46:36 +0000 (UTC)
commit f788c69717d01d089e19b30dd610302d4796606e
Author: Debarshi Ray <debarshir src gnome org>
Date: Sun Dec 27 17:22:18 2009 +0200
Convert struct tm.tm_year into actual year
src/sharp/datetime.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/sharp/datetime.cpp b/src/sharp/datetime.cpp
index 6c818b5..8a700ed 100644
--- a/src/sharp/datetime.cpp
+++ b/src/sharp/datetime.cpp
@@ -70,7 +70,7 @@ namespace sharp {
{
struct tm result;
localtime_r(&m_date.tv_sec, &result);
- return result.tm_year;
+ return result.tm_year + 1900;
}
int DateTime::day_of_year() const
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]