mirror of
https://github.com/godotengine/godot.git
synced 2025-10-27 11:44:21 +00:00
Fixes the month consistency issue in enums and get_date etc
- Also updated the docs to reflect this. - Added some vim temp files to gitignore - Changed NaCL to be consistent with the other OS_Unix::get_date implementation (added 1 to month to map to 1-12) Ticket: https://github.com/godotengine/godot/issues/4025
This commit is contained in:
parent
be4d58e120
commit
feef563f3f
7 changed files with 45 additions and 18 deletions
|
|
@ -251,6 +251,9 @@ OS::Date OS_Unix::get_date(bool utc) const {
|
|||
lt=localtime(&t);
|
||||
Date ret;
|
||||
ret.year=1900+lt->tm_year;
|
||||
// Index starting at 1 to match OS_Unix::get_date
|
||||
// and Windows SYSTEMTIME and tm_mon follows the typical structure
|
||||
// of 0-11, noted here: http://www.cplusplus.com/reference/ctime/tm/
|
||||
ret.month=(Month)(lt->tm_mon + 1);
|
||||
ret.day=lt->tm_mday;
|
||||
ret.weekday=(Weekday)lt->tm_wday;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue