DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

clock(F)


clock -- the system real-time (time of day) clock

Format

MMddhhmmyy

Description

The clock special device file (/dev/clock) provides access to the battery-powered, real-time time of day clock. Reading this file returns the current time; writing to the file sets the current time.

The time, 10 bytes long, has the form MMddhhmmyy where MM is the month, dd is the day, hh is the hour, mm is the minute, and yy is the last two digits of the year.

Examples

The command echo `cat /dev/clock` prints the current time on the standard output.

The time 0826150392 corresponds to 15:03 on August 26, 1992.

Limitations

Not all computers have battery-powered real-time time of day clocks. Refer to your computer's hardware reference manual.

You cannot set the time on the real-time clock if the permissions of /dev/clock do not allow it.

Files


/dev/clock
full pathname of clock

See also

setclock(ADM)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003