---
name: "resettodr"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/resettodr"
---

# resettodr(9)

set battery-backed clock from system time

## NAME

**resettodr** – set battery-backed clock from system time

## SYNOPSIS

**#include \<sys/types.h\>**

**#include \<sys/systm.h\>**

*void*\

**resettodr**(*void*);

## DESCRIPTION

The **resettodr**() function sets the system's battery-backed clock based on the contents of the system *time* variable.

## SEE ALSO

[inittodr(9)](/inittodr/9.md), [time(9)](/time/9.md)

## BUGS

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.
