From 85b02bddc0389487eaa8936de38441a1f95e08ea Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 1 Apr 2020 10:57:30 -0700 Subject: Add rtcwake. Some of the bringup folks are debugging RTC issues and asked for this. Rather than duplicate the weird xtzset dance with mktime, I've factored that out into a new xmktime that takes a boolean for whether to use UTC or local time. Otherwise, the slight cleanup of hwclock.c is entirely optional. The only functional change there is that util-linux 2.34's hwclock uses ISO time format, which is the usual toybox preference anyway, so I've switched it over to that rather than ctime(3). Bug: http://b/152042947 --- lib/lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/lib.h') diff --git a/lib/lib.h b/lib/lib.h index 66b39d67..c528f190 100644 --- a/lib/lib.h +++ b/lib/lib.h @@ -188,6 +188,7 @@ void xsignal(int signal, void *handler); time_t xvali_date(struct tm *tm, char *str); void xparsedate(char *str, time_t *t, unsigned *nano, int endian); char *xgetline(FILE *fp, int *len); +time_t xmktime(struct tm *tm, int utc); // lib.c void verror_msg(char *msg, int err, va_list va); -- cgit v1.2.3