Hi i have this problem with date() returning the wrong month
else if ( cmd == "time" )
{
local now = date();
Message( COLOR_MOV+"The time is currently " + now.day + "/" + now.month + "/" + now.year + " " + now.hour + ":" + now.min + ":" + now.sec + "" );
}
What is wrong here? it returns the previous month instead
Configure your VPS's date and time.
According to the squirrel docs (http://www.squirrel-lang.org/doc/sqstdlib3.html#d0e1938) the .month property returns the month as month index (0-11)
Quotemonth Month (0 - 11; January = 0).
So simply add +1 to get the current month number