openpyxl.utils.datetime模块

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

基类:datetime.tzinfo

dst(dt)[源代码]

datetime->DST偏移量为UTC东部的正时间增量。

tzname(dt)[源代码]

datetime->string时区名称。

utcoffset(dt)[源代码]

datetime->timedelta显示与UTC的偏移量,负值表示UTC西部

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

从时间戳字符串转换为日期时间对象。根据规范18.17.4,支持以下ISO 8601格式。

日期B.1.1和B.2.1乘以B.1.2和B.2.2日期乘以B.1.3和B.2.3

没有时间增量的概念

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

将时间值转换为日分数

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

将TimeDelta值转换为日分数

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

从日期时间转换为时间戳字符串。

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