diff -ur mysql-5.1.34/mysys/mf_getdate.c mysql-5.1.34-bug-37274/mysys/mf_getdate.c --- mysql-5.1.34/mysys/mf_getdate.c 2009-03-31 15:38:43.000000000 +0100 +++ mysql-5.1.34-bug-44424/mysys/mf_getdate.c 2009-04-27 04:24:00.000000000 +0100 @@ -45,15 +45,15 @@ skr=date ? (time_t) date : my_time(0); #if defined(HAVE_LOCALTIME_R) && defined(_REENTRANT) if (flag & GETDATE_GMT) - localtime_r(&skr,&tm_tmp); - else gmtime_r(&skr,&tm_tmp); + else + localtime_r(&skr,&tm_tmp); start_time= &tm_tmp; #else if (flag & GETDATE_GMT) - start_time= localtime(&skr); - else start_time= gmtime(&skr); + else + start_time= localtime(&skr); #endif if (flag & GETDATE_SHORT_DATE) sprintf(to,"%02d%02d%02d",