Enclosed is a patch that documents all of the dc_datetime functions.
The CAVEATS are important because calling gmtime et al from a library might not be expected. (They touch the zoneinfo files, which may not be available on embedded or sandboxed systems.)
I also specifically note the differences to "struct tm" in terms of the year and month field.
Ignore previous.
Resent with dc_datetime_gmtime and dc_datetime_localtime updated to reflect that "result" is filled in and what happens if "result" is NULL.
Best,
Kristaps