• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Time and Time Zone Subsystem
2
3## Introduction
4
5 The time and time zone subsystem provides OpenHarmony with the capability of managing the system time, time zone, and timing.
6
7-   **Time and time zone management**
8
9    Manages the system time and time zone in a unified manner, including setting and obtaining the system time, date, and time zone, and obtaining the system startup time.
10
11-   **Timing management**
12
13    Provides the system timer capability, including creating, starting, stopping, and destroying timers. There are three types of timers: system startup timer, system time timer, and wakeup timer.
14
15
16## System Architecture
17
18**Figure 1** Architecture of the time and time zone subsystem
19
20
21![](figures/architecture-of-the-time-and-time-zone-subsystem.png "Architecture of the time and time zone subsystem")
22
23## Directory Structure
24
25The source code of the time and time zone subsystem is stored in the **/base/time** directory.
26
27The directory structure is as follows:
28
29```
30/base/time/time_service
31├── etc                      # Process configuration files
32├── figures                  # Architecture diagram
33├── framework/js/napi        # JS APIs that are parsed to NAPIs
34├── interfaces/inner_api     # APIs provided for external systems
35├── services                 # Service implementation
36│   └── profile              # System service and process configuration files
37└── utils                    # Utilities, for example, log utility
38```
39
40## Repositories Involved
41
42[time_service](https://gitee.com/openharmony/time_time_service)
43