~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_getdate.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
{
40
40
   register struct tm *start_time;
41
41
   time_t skr;
42
 
#if defined(HAVE_LOCALTIME_R) && defined(_REENTRANT)
43
 
  struct tm tm_tmp;
44
 
#endif
 
42
   struct tm tm_tmp;
45
43
 
46
44
   skr= date ? (time_t) date : time(0);
47
 
#if defined(HAVE_LOCALTIME_R) && defined(_REENTRANT)
48
45
   if (flag & GETDATE_GMT)
49
46
     localtime_r(&skr,&tm_tmp);
50
47
   else
51
48
     gmtime_r(&skr,&tm_tmp);
52
49
   start_time= &tm_tmp;
53
 
#else
54
 
   if (flag & GETDATE_GMT)
55
 
     start_time= localtime(&skr);
56
 
   else
57
 
     start_time= gmtime(&skr);
58
 
#endif
59
50
   if (flag & GETDATE_SHORT_DATE)
60
51
     sprintf(to,"%02d%02d%02d",
61
52
             start_time->tm_year % 100,