• Home
Name Date Size #Lines LOC

..--

data/12-May-2024-3,5783,132

figures/12-May-2024-

tool/12-May-2024-14694

LICENSED12-May-20249.9 KiB177150

OAT.xmlD12-May-20241.9 KiB4021

README.mdD12-May-20241.8 KiB4630

README_zh.mdD12-May-20242.1 KiB5031

binary_file_build.mdD12-May-20241 KiB2319

bundle.jsonD12-May-20241.4 KiB6261

README.md

1# Time Zone
2
3## Introduction
4
5The time zone module provides the functions of updating, parsing, compiling, and deploying time zone data.
6
7## Directory Structure
8
9The directory structure of the time zone module is as follows:
10
11```
12/base/global/
13├── timezone           # Code repository of the time zone module
14│   ├── data          # Time zone compilation data
15│   ├── tool          # Time zone management tool
16│   │   ├── compile_tool              # Time zone compilation tool
17│   │   └── update_tool          # Time zone update tool
18```
19
20## Description
21
22The time zone update tool searches for the latest version of time zone data from the [Internet Assigned Numbers Authority (IANA) database](https://data.iana.org/time-zones/releases/). 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:
23
24```
25cd tool/update_tool // Go to the directory where the time zone update tool is located.
26python3 download_iana.py  // Run the data update script.
27```
28
29The 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:
30
31```
32cd tool/compile_tool // Go to the directory where the time zone compilation tool is located.
33chmod 755 compile.sh
34./compile.sh // Run the compilation script.
35```
36
37## Repositories Involved
38
39[Globalization Subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/globalization.md)
40
41**global\_timezone**
42
43[global\_i18n\_standard](https://gitee.com/openharmony/global_i18n_standard/blob/master/README.md)
44
45[global\_resmgr\_standard](https://gitee.com/openharmony/global_resmgr_standard/blob/master/README.md)
46

README_zh.md

1# 时区数据管理部件
2
3## 简介
4
5**时区数据管理部件**提供时区数据的更新、编译、部署等功能,支持其他子系统访问系统时区数据。时区数据管理部件支持如下设备:润和DAYU200	RK3568。
6
7![](figures/timezone.png)
8
9**时区数据管理部件架构图说明:**
10
11- **时区数据更新**会从[IANA时区数据官网](https://data.iana.org/time-zones/releases/)搜索当前时区数据的最新版本。若官网存在新的时区数据版本,则时区数据更新工具会下载最新版本时区数据进行数据更新,否则不执行数据更新操作。更新的时区数据会被保存到./data/iana/目录下,示例如下:
12
13```
14cd tool/update_tool  // 切换到时区数据更新工具所在目录
15python3 download_iana.py  // 执行数据更新脚本
16```
17
18- **时区数据编译**会对时区源数据进行编译,并在./data/prebuild/posix目录下生成时区二进制数据,在./data/prebuild/tool/linux目录下生成时区工具zic。示例如下:
19
20```
21cd tool/compile_tool  // 切换到时区数据编译工具所在目录
22chmod 755 compile.sh
23./compile.sh  // 执行数据更新脚本
24```
25
26- **时区数据部署**通过提供构建脚本,将时区数据部署到系统设备上。其中IANA时区数据部署到系统设备的/etc/zoneinfo目录下,icu时区数据部署到etc/icu_tzdata目录下。构建脚本为data/Build.gn27
28
29## 目录
30
31时区数据管理组件目录结构如下所示:
32
33```
34/base/global/
35├── timezone           # 时区数据管理组件代码仓
36│   ├── data          # 时区编译数据目录
37│   ├── tool          # 时区数据管理工具
38│   │   ├── compile_tool              # 时区数据编译工具
39│   │   └── update_tool          # 时区数据更新工具
40```
41
42## 相关仓
43
44[全球化子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E5%85%A8%E7%90%83%E5%8C%96%E5%AD%90%E7%B3%BB%E7%BB%9F.md)
45
46[global\_i18n](https://gitee.com/openharmony/global_i18n/blob/master/README_zh.md)
47
48[global\_resource\_management](https://gitee.com/openharmony/global_resource_management/blob/master/README_zh.md)
49
50