RESETTODR(9)
β¨ RESETTODR(9) β¨
okay bestie, this is a page from the Kernel Developer's Manual and it's literally about the clock. yes, THE clock. the one that keeps ticking even when your laptop's like "ma'am I have no power". let's get into it π
π NAME π
resettodr β set the battery-backed clock from system time
like, it writes the current system time into the little battery-powered clock so it doesn't forget who it is. periodt β°
π¦ SYNOPSIS π¦
#include <sys/types.h>
#include <sys/systm.h>
void
resettodr(void);
no arguments, no return value, just vibes. she takes nothing and gives nothing back (in the return-value sense, anyway π«Ά).
πΈ DESCRIPTION πΈ
The resettodr() function sets the system's battery-backed clock based on the contents of the system time variable.
that's it. that's the whole thing. she reads the system time, she writes it to the battery-backed clock, and the clock stays in the loop. no cap. π₯
π SEE ALSO π
go read those too, they're the rest of the clock lore iykyk π
π BUGS π
ok so this is the part where we keep it real:
On many systems, resettodr() has to convert from time to a time expressed in terms of year, month, day, hours, minutes, and seconds.
Many of the implementations could share code, but do not.
read that again. they could share code. they do not. iconic behavior honestly π every implementation is out here reinventing the calendar conversion from scratch like it's their first day. no sharing, no teamwork, just main character energy in every single driver. we love that for them (we do not love that for them).
and that's the whole page bestie!! this one's from Debian, dated November 13, 1995 β yes it's older than you, and it's still out here converting months by hand. respect the elders ππ RESETTODR(9) forever β¨π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1994 Christopher G. Demetriou
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms