| 1168 | |
| 1169 | |
| 1170 | static |
| 1171 | void |
| 1172 | append_datetime(String *buf, Time_zone *time_zone, my_time_t secs, |
| 1173 | const char *name, uint len) |
| 1174 | { |
| 1175 | char dtime_buff[20*2+32];/* +32 to make my_snprintf_{8bit|ucs2} happy */ |
| 1176 | buf->append(STRING_WITH_LEN(" ")); |
| 1177 | buf->append(name, len); |
| 1178 | buf->append(STRING_WITH_LEN(" '")); |
| 1179 | /* |
| 1180 | Pass the buffer and the second param tells fills the buffer and |
| 1181 | returns the number of chars to copy. |
| 1182 | */ |
| 1183 | MYSQL_TIME time; |
| 1184 | time_zone->gmt_sec_to_TIME(&time, secs); |
| 1185 | buf->append(dtime_buff, my_datetime_to_str(&time, dtime_buff, 0)); |
| 1186 | buf->append(STRING_WITH_LEN("'")); |
| 1187 | } |
| 1188 | |
| 1189 | |
| 1190 | /* |
no test coverage detected