dns: add common dns_timestamp util functions
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 11 Mar 2021 02:17:28 +0000 (15:17 +1300)
committerJeremy Allison <jra@samba.org>
Mon, 29 Mar 2021 23:20:37 +0000 (23:20 +0000)
commit2b9279bd31dfb13209d828dd57f92beb67ba2f71
tree3d70733394aac940b02cbeaa7b6be420a2dbfabc
parentb2ee40b5123ce466bfda67cdf63a540ae82a212e
dns: add common dns_timestamp util functions

The dns structs have an unsigned 32 bit timestamp in hours since the
beginning of 1601. In a number of places we need to convert from unix
time to this timestamp, or from the timestamp to NTTIME.

You'll see subsequent patches that make use of these functions.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/dns_server/dnsserver_common.c
source4/dns_server/dnsserver_common.h