#include <isc/buffer.h>
#include <isc/lang.h>
Go to the source code of this file.
Defines | |
#define | DNS_TIME_H 1 |
Functions | |
ISC_LANG_BEGINDECLS isc_result_t | dns_time64_fromtext (const char *source, isc_int64_t *target) |
Convert a date and time in YYYYMMDDHHMMSS text format at 'source' into to a 64-bit count of seconds since Jan 1 1970 0:00 GMT. Store the count at 'target'. | |
isc_result_t | dns_time32_fromtext (const char *source, isc_uint32_t *target) |
Like dns_time64_fromtext, but returns the second count modulo 2^32 as per RFC2535. | |
isc_result_t | dns_time64_totext (isc_int64_t value, isc_buffer_t *target) |
Convert a 64-bit count of seconds since Jan 1 1970 0:00 GMT into a YYYYMMDDHHMMSS text representation and append it to 'target'. | |
isc_result_t | dns_time32_totext (isc_uint32_t value, isc_buffer_t *target) |
Like dns_time64_totext, but for a 32-bit cyclic time value. Of those dates whose counts of seconds since Jan 1 1970 0:00 GMT are congruent with 'value' modulo 2^32, the one closest to the current date is chosen. | |
isc_int64_t | dns_time64_from32 (isc_uint32_t value) |
Covert a 32-bit cyclic time value into a 64 bit time stamp. |
Definition in file time.h.
ISC_LANG_BEGINDECLS isc_result_t dns_time64_fromtext | ( | const char * | source, | |
isc_int64_t * | target | |||
) |
Convert a date and time in YYYYMMDDHHMMSS text format at 'source' into to a 64-bit count of seconds since Jan 1 1970 0:00 GMT. Store the count at 'target'.
Definition at line 134 of file time.c.
References day, days, DNS_R_SYNTAX, is_leap, ISC_R_SUCCESS, and RANGE.
Referenced by dns_time32_fromtext(), load_text(), and strtotime().
isc_result_t dns_time32_fromtext | ( | const char * | source, | |
isc_uint32_t * | target | |||
) |
Like dns_time64_fromtext, but returns the second count modulo 2^32 as per RFC2535.
Definition at line 202 of file time.c.
References dns_time64_fromtext(), and ISC_R_SUCCESS.
Referenced by ATF_TC_BODY(), dns_view_loadnta(), dst__privstruct_parse(), fromtext_keydata(), fromtext_rrsig(), and fromtext_sig().
isc_result_t dns_time64_totext | ( | isc_int64_t | value, | |
isc_buffer_t * | target | |||
) |
Convert a 64-bit count of seconds since Jan 1 1970 0:00 GMT into a YYYYMMDDHHMMSS text representation and append it to 'target'.
Definition at line 41 of file time.c.
References isc_region::base, isc_buffer_add, isc_buffer_availableregion, ISC_R_NOSPACE, ISC_R_RANGE, ISC_R_SUCCESS, isc_region::length, month_secs, and year_secs.
Referenced by dns_time32_totext(), and dump_rdatasets_text().
isc_result_t dns_time32_totext | ( | isc_uint32_t | value, | |
isc_buffer_t * | target | |||
) |
Like dns_time64_totext, but for a 32-bit cyclic time value. Of those dates whose counts of seconds since Jan 1 1970 0:00 GMT are congruent with 'value' modulo 2^32, the one closest to the current date is chosen.
Definition at line 129 of file time.c.
References dns_time64_from32(), and dns_time64_totext().
Referenced by ATF_TC_BODY(), dns_ntatable_save(), dst__privstruct_writefile(), printtime(), totext_keydata(), totext_rrsig(), totext_sig(), and writeheader().
isc_int64_t dns_time64_from32 | ( | isc_uint32_t | value | ) |
Covert a 32-bit cyclic time value into a 64 bit time stamp.
Definition at line 107 of file time.c.
References isc_serial_gt(), isc_stdtime_get(), now, and start.
Referenced by del_sigs(), and dns_time32_totext().