~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_getdate.cc

Moved the last of the libdrizzleclient calls into Protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
#include "mysys_priv.h"
19
19
#include <mystrings/m_string.h>
 
20
#include <stdio.h>
20
21
 
21
22
/*
22
23
  get date as string
42
43
  struct tm tm_tmp;
43
44
#endif
44
45
 
45
 
   skr=date ? (time_t) date : my_time(0);
 
46
   skr= date ? (time_t) date : time(0);
46
47
#if defined(HAVE_LOCALTIME_R) && defined(_REENTRANT)
47
48
   if (flag & GETDATE_GMT)
48
49
     localtime_r(&skr,&tm_tmp);
67
68
             start_time->tm_mon+1,
68
69
             start_time->tm_mday);
69
70
   if (flag & GETDATE_DATE_TIME)
70
 
     sprintf(strend(to),
 
71
     sprintf(strchr(to, '\0'),
71
72
             ((flag & GETDATE_FIXEDLENGTH) ?
72
73
              " %02d:%02d:%02d" : " %2d:%02d:%02d"),
73
74
             start_time->tm_hour,
74
75
             start_time->tm_min,
75
76
             start_time->tm_sec);
76
77
   else if (flag & GETDATE_HHMMSSTIME)
77
 
     sprintf(strend(to),"%02d%02d%02d",
 
78
     sprintf(strchr(to, '\0'),"%02d%02d%02d",
78
79
             start_time->tm_hour,
79
80
             start_time->tm_min,
80
81
             start_time->tm_sec);