1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include <errno.h> 5 #include <time.h> 6 7 typedef enum ClockChangeDirection { 8 CLOCK_CHANGE_NOOP, 9 CLOCK_CHANGE_FORWARD, 10 CLOCK_CHANGE_BACKWARD, 11 _CLOCK_CHANGE_MAX, 12 _CLOCK_CHANGE_INVALID = -EINVAL, 13 } ClockChangeDirection; 14 15 int clock_is_localtime(const char* adjtime_path); 16 int clock_set_timezone(int *ret_minutesdelta); 17 int clock_reset_timewarp(void); 18 int clock_get_hwclock(struct tm *tm); 19 int clock_set_hwclock(const struct tm *tm); 20 int clock_apply_epoch(ClockChangeDirection *ret_attempted_change); 21