t2timestamp()
#
t2timestamp()
converts a given time value into a formatted timestamp string, supporting both local and UTC time representations.
Prototype
char *t2timestamp(
char *bf,
int bfsize,
time_t t,
BOOL local
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Buffer to store the formatted timestamp. |
|
|
Size of the buffer to ensure safe string formatting. |
|
|
Time value to be converted into a timestamp. |
|
|
Flag indicating whether to use local time ( |
Return Value
Returns a pointer to the formatted timestamp string stored in bf
.
Notes
The function uses strftime()
to format the timestamp in ISO 8601 format with timezone information.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples