datetime: fix const inconsistency

This broke the win32 build as the header prototype didn't match the
implementation.