1ec505e04SMike Pritchard.\" $NetBSD: resettodr.9,v 1.1 1995/11/25 21:24:51 perry Exp $ 2ec505e04SMike Pritchard.\" 3ec505e04SMike Pritchard.\" Copyright (c) 1994 Christopher G. Demetriou 4ec505e04SMike Pritchard.\" All rights reserved. 5ec505e04SMike Pritchard.\" 6ec505e04SMike Pritchard.\" Redistribution and use in source and binary forms, with or without 7ec505e04SMike Pritchard.\" modification, are permitted provided that the following conditions 8ec505e04SMike Pritchard.\" are met: 9ec505e04SMike Pritchard.\" 1. Redistributions of source code must retain the above copyright 10ec505e04SMike Pritchard.\" notice, this list of conditions and the following disclaimer. 11ec505e04SMike Pritchard.\" 2. Redistributions in binary form must reproduce the above copyright 12ec505e04SMike Pritchard.\" notice, this list of conditions and the following disclaimer in the 13ec505e04SMike Pritchard.\" documentation and/or other materials provided with the distribution. 14ec505e04SMike Pritchard.\" 3. All advertising materials mentioning features or use of this software 15ec505e04SMike Pritchard.\" must display the following acknowledgement: 16ec505e04SMike Pritchard.\" This product includes software developed by Christopher G. Demetriou 17ec505e04SMike Pritchard.\" for the NetBSD Project. 18ec505e04SMike Pritchard.\" 3. The name of the author may not be used to endorse or promote products 19ec505e04SMike Pritchard.\" derived from this software without specific prior written permission 20ec505e04SMike Pritchard.\" 21ec505e04SMike Pritchard.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22ec505e04SMike Pritchard.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23ec505e04SMike Pritchard.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24ec505e04SMike Pritchard.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25ec505e04SMike Pritchard.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26ec505e04SMike Pritchard.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27ec505e04SMike Pritchard.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28ec505e04SMike Pritchard.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29ec505e04SMike Pritchard.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30ec505e04SMike Pritchard.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31ec505e04SMike Pritchard.\" 327f3dea24SPeter Wemm.\" $FreeBSD$ 335bf6ab83SNik Clayton.\" 34ec505e04SMike Pritchard.Dd November 13, 1995 35ec505e04SMike Pritchard.Dt RESETTODR 9 363d45e180SRuslan Ermilov.Os 37ec505e04SMike Pritchard.Sh NAME 38ec505e04SMike Pritchard.Nm resettodr 39ec505e04SMike Pritchard.Nd set battery-backed clock from system time 40ec505e04SMike Pritchard.Sh SYNOPSIS 41336ff946SBruce Evans.Fd #include <sys/types.h> 42336ff946SBruce Evans.Fd #include <sys/systm.h> 43ec505e04SMike Pritchard.Ft void 44ec505e04SMike Pritchard.Fn resettodr "void" 45ec505e04SMike Pritchard.Sh DESCRIPTION 46ec505e04SMike PritchardThe 47ec505e04SMike Pritchard.Fn resettodr 48ec505e04SMike Pritchardfunction sets the system's battery-backed clock based on the contents 49ec505e04SMike Pritchardof the system 50ec505e04SMike Pritchard.Va time 51ec505e04SMike Pritchardvariable. 52ec505e04SMike Pritchard.Sh SEE ALSO 53ec505e04SMike Pritchard.Xr inittodr 9 , 54ec505e04SMike Pritchard.Xr time 9 55ec505e04SMike Pritchard.Sh BUGS 56ec505e04SMike PritchardOn many systems, 57ec505e04SMike Pritchard.Fn resettodr 58ec505e04SMike Pritchardhas to convert from 59ec505e04SMike Pritchard.Va time 60ec505e04SMike Pritchardto a time expressed in terms of year, month, day, hours, minutes, 61ec505e04SMike Pritchardand seconds. Many of the implementations could share code, but do not. 62