What about removing my_tm_diff and my_timegm completely and always use the mktime fallback in f_mktime?
/ Martin Nilsson (saturator)
Previous text:
2004-02-01 17:07: Subject: mktime
The function my_tm_diff() in buildint_functions.c is bugged. It doesn't differentiate between months of different length, but treats all months as having 30 days, 10 hours and 30 minutes. This means that e.g. the dates 2004-01-31-12:00:00 and 2004-02-01-01:30:00 will be considered _equal_. The recent failures of the testsuite is due to these state of affairs. The bug can be reproduced with
mktime(gmtime(1075550400))
The bug is likely to occur with any date being the last day of a month containing 31 days, after 10:30 AM.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)