Time utility module header file. More...
#include "string_type.h"
Go to the source code of this file.
Functions | |
E_MCL_ERROR_CODE | time_util_convert_to_iso_8601_format (const time_t *time_value, string_t **iso8601_formatted_time) |
void | time_util_get_time (mcl_time_t *current_time) |
mcl_bool_t | time_util_validate_timestamp (const char *timestamp) |
Time utility module header file.
Definition in file time_util.h.
E_MCL_ERROR_CODE time_util_convert_to_iso_8601_format | ( | const time_t * | time_value, |
string_t ** | iso8601_formatted_time | ||
) |
This function converts time value to ISO 8601 date and time format.
[in] | time_value | Number of seconds passed since reference time. |
[out] | iso8601_formatted_time | Time representation in ISO 8601 format. |
Definition at line 19 of file time_util.c.
References ASSERT_CODE, ASSERT_STATEMENT_CODE_MESSAGE, DEBUG_ENTRY, DEBUG_LEAVE, MCL_DEBUG, MCL_FAIL, MCL_FREE, MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, string_destroy(), and string_initialize_new().
Referenced by file_initialize().
void time_util_get_time | ( | mcl_time_t * | current_time | ) |
This function returns the time elapsed in terms of seconds since Jan 1, 1970 UTC until now.
[in] | current_time | Time value in seconds. |
Definition at line 61 of file time_util.c.
References DEBUG_ENTRY, and DEBUG_LEAVE.
Referenced by _create_self_issued_jwt_payload().
mcl_bool_t time_util_validate_timestamp | ( | const char * | timestamp | ) |
This function validates timestamp in terms of format, length and time value.
[in] | timestamp | Timestamp value to be checked against YYYY-MM-DDThh:mm:ss.sssZ format. Ex:2016-04-26T08:06:25.317Z |
Definition at line 71 of file time_util.c.
References DEBUG_ENTRY, DEBUG_LEAVE, MCL_NULL, string_util_strlen(), and string_util_strtol().
Referenced by mcl_store_new_event(), and mcl_time_series_new_value_set().