From 1ec31a5479ea4deb51df55e0566777670b28d034 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Thu, 10 Dec 2009 12:16:46 +0100 Subject: [PATCH] december bugfix: mktime doesn't like month number 12 --- makefile | 5 +++-- world/net/jabber/mixin_parse.c | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index d0033e3..9446db1 100644 --- a/makefile +++ b/makefile @@ -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 - diff --git a/world/net/jabber/mixin_parse.c b/world/net/jabber/mixin_parse.c index 6a63504..fc561d6 100644 --- a/world/net/jabber/mixin_parse.c +++ b/world/net/jabber/mixin_parse.c @@ -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