RESETTODR(9)
π NAME π
okay so bestie, welcome to the RESETTODR(9) page from the Kernel Developer's Manual β this one is about resettodr, and it's literally the function that sets the battery-backed clock from system time. π«Ά
β¨ SYNOPSIS β¨
First, the includes β do not skip these, bestie:
#include <sys/types.h>
#include <sys/systm.h>
void
resettodr(void);
That's the whole signature: void resettodr(void); β no args, no return value, just a clock-setting moment. π
πΈ DESCRIPTION πΈ
The resettodr() function sets the system's battery-backed clock based on the contents of the system time variable. That's it β it takes what's in the system time variable and uses it to set the battery-backed clock. β
π¦ SEE ALSO π¦
iykyk, go peek at those when you're done here. π«Ά
π BUGS π
Okay, slight yikes: 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. Not them having duplicate code and refusing to share π β it's literally called out here.
xoxo, Debian Β· November 13, 1995 π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1994 Christopher G. Demetriou
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms