CXX-268 Backport CXX-150 Export Date_t and some auxilliary functions

(cherry picked from commit c05e8ff713afd3ebc07219f4ba3348df5b8cc432)