openpyxl.utils.datetime module

class openpyxl.utils.datetime.GMT[源代码]

基类:datetime.tzinfo

dst(dt)[源代码]

datetime -> DST offset as timedelta positive east of UTC.

tzname(dt)[源代码]

datetime -> string name of time zone.

utcoffset(dt)[源代码]

datetime -> timedelta showing offset from UTC, negative values indicating West of UTC

openpyxl.utils.datetime.days_to_time(value)[源代码]
openpyxl.utils.datetime.from_ISO8601(formatted_string)[源代码]

Convert from a timestamp string to a datetime object. According to 18.17.4 in the specification the following ISO 8601 formats are supported.

Dates B.1.1 and B.2.1 Times B.1.2 and B.2.2 Datetimes B.1.3 and B.2.3

There is no concept of timedeltas

openpyxl.utils.datetime.from_excel(value, offset=2415018.5)[源代码]
openpyxl.utils.datetime.time_to_days(value)[源代码]

Convert a time value to fractions of day

openpyxl.utils.datetime.timedelta_to_days(value)[源代码]

Convert a timedelta value to fractions of a day

openpyxl.utils.datetime.to_ISO8601(dt)[源代码]

Convert from a datetime to a timestamp string.

openpyxl.utils.datetime.to_excel(dt, offset=2415018.5)[源代码]