Lines Matching refs:ts
712 struct timespec ts; in method_set_timezone() local
716 assert_se(clock_gettime(CLOCK_REALTIME, &ts) == 0); in method_set_timezone()
717 assert_se(localtime_r(&ts.tv_sec, &tm)); in method_set_timezone()
741 struct timespec ts; in method_set_local_rtc() local
785 assert_se(clock_gettime(CLOCK_REALTIME, &ts) == 0); in method_set_local_rtc()
791 localtime_or_gmtime_r(&ts.tv_sec, &tm, !c->local_rtc); in method_set_local_rtc()
799 ts.tv_sec = mktime_or_timegm(&tm, !c->local_rtc); in method_set_local_rtc()
801 if (clock_settime(CLOCK_REALTIME, &ts) < 0) in method_set_local_rtc()
809 localtime_or_gmtime_r(&ts.tv_sec, &tm, !c->local_rtc); in method_set_local_rtc()
831 struct timespec ts; in method_set_time() local
871 timespec_store(&ts, x); in method_set_time()
873 timespec_store(&ts, (usec_t) utc); in method_set_time()
895 timespec_store(&ts, timespec_load(&ts) + (now(CLOCK_MONOTONIC) - start)); in method_set_time()
898 if (clock_settime(CLOCK_REALTIME, &ts) < 0) { in method_set_time()
904 localtime_or_gmtime_r(&ts.tv_sec, &tm, !c->local_rtc); in method_set_time()
912 "REALTIME="USEC_FMT, timespec_load(&ts), in method_set_time()
913 …SAGE("Changed local time to %s", strnull(format_timestamp(buf, sizeof(buf), timespec_load(&ts))))); in method_set_time()