This patch corrects the result of the computation for the calendar month by adding 1 to the displayed month.
The other one replaces the gmmktime function with mktime. Both patches have the same result ... and no side effects.