MySQL 9.6.0
Source Code Documentation
Mysql_timestamp_imp Class Reference

#include <mysql_timestamp_imp.h>

Static Public Member Functions

static int make_iso8601_timestamp_now (char *buffer, size_t size) noexcept
 Make and return an ISO 8601 / RFC 3339 compliant timestamp. More...
 
static int make_iso8601_timestamp (char *buf, ulonglong utime, enum enum_iso8601_tzmode mode) noexcept
 Make and return an ISO 8601 / RFC 3339 compliant timestamp. More...
 

Member Function Documentation

◆ make_iso8601_timestamp()

int Mysql_timestamp_imp::make_iso8601_timestamp ( char *  buf,
ulonglong  utime,
enum enum_iso8601_tzmode  mode 
)
staticnoexcept

Make and return an ISO 8601 / RFC 3339 compliant timestamp.

Accepts the log_timestamps global variable in its third parameter.

Parameters
bufA buffer of at least iso8601_size bytes to store the timestamp in. The timestamp will be \0 terminated.
utimeMicroseconds since the epoch
modeif 0, use UTC; if 1, use local time
Return values
lengthof timestamp (excluding \0)

◆ make_iso8601_timestamp_now()

int Mysql_timestamp_imp::make_iso8601_timestamp_now ( char *  buffer,
size_t  size 
)
staticnoexcept

Make and return an ISO 8601 / RFC 3339 compliant timestamp.

Parameters
buffera buffer of at least iso8601_size bytes to store the timestamp in. The timestamp will be \0 terminated.
sizesize of the buffer.
Return values
0if size < iso8601_size else length of the timestamp (excluding \0)

The documentation for this class was generated from the following files: