Thanks for taking this on. Some comments.
These days, there's little reason to use macros instead of static functions. So
I suggest renaming DEBUG0 to debug0 and making it a static function, and
similarly for the other macros.
Also, the debug function should call gettext, instead of having its caller do
it. That'll make the program a bit smaller. E.g., instead of this:
DEBUG_PRINT_RELATIVE_TIME (_("hybrid"), pc);
do this:
debug_print_relative_time ("hybrid", pc);
and have debug_print_relative_time call gettext.
Come to think of it, should we even be translating the debugging output at all?
It's unlikely to be useful to anybody lacking access to the source code, which
is in English. Plus, some of the strings are not being translated anyway, for
alignment reasons.
debug_stfdatetime can use nstrftime (in the strftime module) instead of doing
things by hand. nstrftime deals with time zones and nanoseconds and should be
well-behaved with unusual time stamps.
parse-datetime should really be made reentrant, on systems that support that, by
using the time_rz module. This is a larger task, though, and can be deferred.