time_service.h

Overview

Declares the API for obtaining the time and time zone information.

Library: libtime_service_ndk.so

System capability: SystemCapability.MiscServices.Time

Since: 12

Related module: TimeService

Summary

Types

Name Description
TimeService_ErrCode Enumerates the error codes.

Enums

Name Description
TimeService_ErrCode {
TIMESERVICE_ERR_OK = 0,
TIMESERVICE_ERR_INTERNAL_ERROR = 13000001,
TIMESERVICE_ERR_INVALID_PARAMETER = 13000002
}
Enumerates the error codes.

Functions

Name Description
TimeService_ErrCodeOH_TimeService_GetTimeZone (char *timeZone, uint32_t len) Returns the current system time zone.