Lines Matching refs:now
65 struct tm now; in capture_current_time() local
66 qemu_get_timedate(&now, s->offset); in capture_current_time()
67 s->nvram[0] = to_bcd(now.tm_sec); in capture_current_time()
68 s->nvram[1] = to_bcd(now.tm_min); in capture_current_time()
70 int tmp = now.tm_hour; in capture_current_time()
80 s->nvram[2] = to_bcd(now.tm_hour); in capture_current_time()
82 s->nvram[3] = (now.tm_wday + s->wday_offset) % 7 + 1; in capture_current_time()
83 s->nvram[4] = to_bcd(now.tm_mday); in capture_current_time()
84 s->nvram[5] = to_bcd(now.tm_mon + 1); in capture_current_time()
85 s->nvram[6] = to_bcd(now.tm_year - 100); in capture_current_time()
144 struct tm now; in ds1338_send() local
145 qemu_get_timedate(&now, s->offset); in ds1338_send()
149 now.tm_sec = from_bcd(data & 0x7f); in ds1338_send()
152 now.tm_min = from_bcd(data & 0x7f); in ds1338_send()
163 now.tm_hour = tmp; in ds1338_send()
165 now.tm_hour = from_bcd(data & (HOURS_12 - 1)); in ds1338_send()
174 s->wday_offset = (user_wday - now.tm_wday + 7) % 7; in ds1338_send()
178 now.tm_mday = from_bcd(data & 0x3f); in ds1338_send()
181 now.tm_mon = from_bcd(data & 0x1f) - 1; in ds1338_send()
184 now.tm_year = from_bcd(data) + 100; in ds1338_send()
187 s->offset = qemu_timedate_diff(&now); in ds1338_send()