示例#1
0
文件: utils.py 项目: zhongjl/emmett
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
    )
示例#2
0
文件: utils.py 项目: gi0baro/weppy
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
    )