浏览代码

get_date on Linux

tm_mon is 0-11
Mavhod 10 年之前
父节点
当前提交
69710055f0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/unix/os_unix.cpp

+ 1 - 1
drivers/unix/os_unix.cpp

@@ -242,7 +242,7 @@ OS::Date OS_Unix::get_date(bool utc) const {
 		lt=localtime(&t);
 	Date ret;
 	ret.year=1900+lt->tm_year;
-	ret.month=(Month)lt->tm_mon;
+	ret.month=(Month)lt->tm_mon + 1;
 	ret.day=lt->tm_mday;
 	ret.weekday=(Weekday)lt->tm_wday;
 	ret.dst=lt->tm_isdst;