def parse_datetime(text): parsed = _pendulum_normalize( _pendulum_parse(text, **_pendulum_parsing_opts)) return pendulum.datetime( parsed.year, parsed.month, parsed.day, parsed.hour, parsed.minute, parsed.second, parsed.microsecond, tz=parsed.tzinfo or pendulum.UTC )