Lines Matching defs:utc
54 static time_t read_rtc(int utc)
67 if (utc) {
75 if (utc) {
84 static void write_rtc(time_t t, int utc)
89 tm = *(utc ? gmtime(&t) : localtime(&t));
97 static void show_clock(int utc)
103 t = read_rtc(utc);
110 //printf("%s %.6f seconds %s\n", cp, 0.0, utc ? "" : (ptm->tm_isdst ? tzname[1] : tzname[0]));
114 static void to_sys_clock(int utc)
119 tv.tv_sec = read_rtc(utc);
125 static void from_sys_clock(int utc)
132 write_rtc(tv.tv_sec, utc);
142 int utc = 0;
157 utc = 1;
164 return utc;
178 int utc;
183 "utc\0" No_argument "u"
194 /* If -u or -l wasn't given check if we are using utc */
196 utc = opt & HWCLOCK_OPT_UTC;
198 utc = check_utc();
201 to_sys_clock(utc);
205 from_sys_clock(utc);
209 show_clock(utc);