tm2timestamp()

tm2timestamp()#

Converts a struct tm time representation into an ISO 8601 formatted timestamp string.

Prototype

char *tm2timestamp(
    char *bf,
    int   bfsize,
    struct tm *tm
);

Parameters

Key

Type

Description

bf

char *

Buffer to store the formatted timestamp.

bfsize

int

Size of the buffer bf.

tm

struct tm *

Pointer to a struct tm containing the time to be formatted.


Return Value

Returns a pointer to the buffer bf containing the formatted timestamp.

Notes

The output format follows the ISO 8601 standard: YYYY-MM-DDTHH:MM:SS.0±HHMM.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples