~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/date_format.cc

Merge Siddharth

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
        str->append(hours_i < 12 ? "AM" : "PM",2);
180
180
        break;
181
181
      case 'r':
182
 
        length= sprintf(intbuff,
 
182
        length= snprintf(intbuff, sizeof(intbuff), 
183
183
                    ((l_time->hour % 24) < 12) ?
184
184
                    "%02d:%02d:%02d AM" : "%02d:%02d:%02d PM",
185
185
                    (l_time->hour+11)%12+1,
193
193
        str->append_with_prefill(intbuff, length, 2, '0');
194
194
        break;
195
195
      case 'T':
196
 
        length= sprintf(intbuff,
 
196
        length= snprintf(intbuff, sizeof(intbuff), 
197
197
                    "%02d:%02d:%02d",
198
198
                    l_time->hour,
199
199
                    l_time->minute,