python包pytz的扩展,提供转换时区名称、缩写和偏移量的函数。
pytz-convert的Python项目详细描述
Pytz转换
包pytz的python扩展。
安装
pip install pytz-convert
架构
pytz-convert是pytz的扩展,提供转换时区名称、缩写和偏移量的函数。
功能
- convert_bing_ads_tz:将bing时区名称转换为standard时区名称。
- convert_tz_abbrev_to_tz_hours():将时区缩写转换为时区小时。
- convert_tz_abbrev_to_tz_offset():将时区缩写转换为时区偏移。
- convert_tz_abbrev_to_tz_seconds():将时区缩写转换为时区秒。
- convert_tz_hours_to_tz_offset():将timezone hours转换为timezone offset。
- convert_tz_name_to_date_tz_abbrev():将时区名称+日期转换为时区缩写。
- convert_tz_name_to_date_tz_offset():将时区名称+日期转换为时区偏移量。
- convert_tz_name_to_now_tz_abbrev():将timezone name+当前日期转换为当前timezone缩写。
- convert_tz_name_to_now_tz_offset():将时区名称+当前日期转换为当前时区偏移量。
- convert_tz_offset_and_date_to_tz_name():将时区偏移量+日期转换为时区名称。
- convert_tz_offset_to_now_tz_abbrev():将时区偏移量+当前日期转换为当前时区缩写。
- convert_tz_offset_to_tz_hours():将时区偏移量转换为小时。
- convert_tz_offset_to_tz_minutes():将时区偏移量转换为分钟。
- convert_tz_offset_to_tz_seconds():将时区偏移量转换为秒。
- parse_gmt_offset_timezone():将GMT字符串解析为timezone name和timezone offset。
- validate_tz_abbrev():验证时区缩写。
- validate_tz_name():验证时区名称。
要求
pytz-convert模块基于python 3构建,并且依赖于 Python Package Index PyPI中提供了几个python模块。
make install-requirements
或
python3 -m pip uninstall --yes --no-input -r requirements.txt python3 -m pip install --upgrade -r requirements.txt
0.2.8(2018-02-19)
- 支持Python2.7
- travis ci同时测试python 2.7和3.6。
0.2.8(2018-02-16)
- 迁移到github/tunelab。
0.2.3(2018-01-25)
- 迁移到github/tuneinc。
- 许可证:麻省理工学院
0.2.0(2017-12-10)
- 阅读docs.org
0.1.0(2017-11-25)
- 自述
- 测试
0.0.5(2017-06-15)
- 将Bing_时区添加到将Bing TZ名称映射到Pytz TZ名称的首选dict中
- 添加convert_bing_ads_tz函数
0.0.1(2016-11-17)
- 初始版本