mirror of
https://github.com/openharmony/global_timezone.git
synced 2026-07-01 03:23:12 -04:00
12b4eaab7586f09558a962f256acd1e6afecce11
Time Zone
Introduction
The time zone module provides the functions of updating, parsing, compiling, and deploying time zone data.
Directory Structure
The directory structure of the time zone module is as follows:
/base/global/
├── timezone # Code repository of the time zone module
│ ├── data # Time zone compilation data
│ ├── tool # Time zone management tool
│ │ ├── compile_tool # Time zone compilation tool
│ │ └── update_tool # Time zone update tool
Description
The time zone update tool searches for the latest version of time zone data from the Internet Assigned Numbers Authority (IANA) database. If a new version of time zone data is available, the time zone update tool downloads the data to update the local time zone data. The updated time zone data is saved in the ./data/iana/ directory. The following is an example:
cd tool/update_tool // Go to the directory where the time zone update tool is located.
python3 download_iana.py // Run the data update script.
The time zone compilation tool compiles the time zone source data and generates time zone binary data in ./data/prebuild/posix. The following is an example:
cd tool/compile_tool // Go to the directory where the time zone compilation tool is located.
chmod 755 compile.sh
./compile.sh // Run the compilation script.
Repositories Involved
global_timezone
Description
TimeZone data management provides timezone data management tools| includes update| parse| compile| deploy | 时区数据管理组件提供时区数据管理工具,包括:时区数据更新、解析、编译、部署
Languages
Python
76.4%
Shell
23.6%