december bugfix: mktime doesn't like month number 12

This commit is contained in:
psyc://psyced.org/~lynX 2009-12-10 12:16:46 +01:00
parent f47227d54d
commit 1ec31a5479
2 changed files with 7 additions and 4 deletions

View File

@ -58,6 +58,7 @@ local/all.ls:
.links:
(cd world;../bin/findlinks */de/* */en/*) >$@
exefix:
rights:
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod +x bin/* run/* config/psyced.settings install.sh utility/multipatcher

View File

@ -221,8 +221,10 @@ jabberMsg(XMLNode node, mixed origin, mixed *su, array(mixed) tu) {
time[TM_YEAR], time[TM_MON],
time[TM_MDAY], time[TM_HOUR],
time[TM_MIN], time[TM_SEC]);
if (res == 6 && (res = mktime(time)) != -1) {
vars["_time_place"] = res; //helper["@stamp"];
if (res == 6) {
// mktime uses month from 0 to 11, december error fixed
time[TM_MON]--;
if ((res = mktime(time)) != -1) vars["_time_place"] = res;
}
}
#endif