yumapro  20.10-12
YumaPro SDK
tstamp.h File Reference

Timestamp utilities. More...

#include <time.h>
#include <sys/time.h>
Include dependency graph for tstamp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TSTAMP_MIN_HEXSIZE   17
 minimum buffer size for hex format
 
#define TSTAMP_MIN_SIZE   22
 normal minimum buffer size for a tstamp buffer
 
#define TSTAMP_DATE_SIZE   12
 minimum buffer size for just a date string
 
#define TSTAMP_SQL_SIZE   20
 minimum buffer size for SQL date format string
 
#define TSTAMP_HTML_SIZE   50
 minimum buffer size for HTML format string
 

Functions

void tstamp_datetime (xmlChar *buff)
 Set the current date and time in an XML dateTime string format. More...
 
void tstamp_local_datetime (xmlChar *buff)
 Set the current date and time in an XML dateTime string format. More...
 
void tstamp_date (xmlChar *buff)
 Set the current date in an XML dateTime string format. More...
 
void tstamp_datetime_sql (xmlChar *buff)
 Set the current date and time in an XML dateTime string format. More...
 
xmlChar * tstamp_convert_to_utctime (const xmlChar *timestr, boolean *isNegative, status_t *res)
 Check if the specified string is a valid dateTime or date-and-time string is valid and if so, convert it to UTC time. More...
 
void tstamp_datetime_dirname (xmlChar *buff)
 Set the current date and time in an XML dateTime string format. More...
 
void tstamp_time2datetime (time_t *timerec, xmlChar *buff)
 Convert the specified time_t to a YANG data-and-time format. More...
 
status_t tstamp_time2htmltime (time_t *timerec, xmlChar *buff, size_t buffsize)
 Convert the specified time_t to a HTML timestamp string. More...
 
status_t tstamp_htmltime2time (const xmlChar *timestr, time_t *timerec)
 Convert the specified HTML timestamp string to time_t format. More...
 
int32 tstamp_difftime (time_t *time1, time_t *time2)
 Compare 2 time_t structs. More...
 
void tstamp_now (time_t *tim)
 Set the time_t to the current time. More...
 
long int tstamp_diff (struct timeval *start_time, struct timeval *end_time, long int *usec)
 Get the elapsed time between two timeval structs. More...
 
void tstamp_time2hex (time_t *tim, xmlChar *buf)
 Convert the time_t to a string of hex digits. More...
 
time_t tstamp_cvt_TIME (char const *time_str)
 Convert the DATE string to a time_t. More...
 

Detailed Description

Timestamp utilities.