Rewrite the datetime utility