<?xml version="1.0" encoding="UTF-8"?>
<!-- **************************************************************************
.... For copyright and licensing terms, see the file named COPYING.
.... **************************************************************************
.-->
<?xml-stylesheet href="docbook-xml.css" type="text/css"?>

<refentry id="clockview">

<refmeta xmlns:xi="http://www.w3.org/2001/XInclude">
<refentrytitle>clockview</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">user commands</refmiscinfo>
<refmiscinfo class="source">djbwares</refmiscinfo>
<xi:include href="version.xml" />
</refmeta>

<refnamediv>
<refname>clockview</refname>
<refpurpose>view an adjustment to the local clock</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>clockview</command>
</cmdsynopsis>
</refsynopsisdiv>

<refsection>
<title>Description</title>

<para>
<command>clockview</command> reads a TAI64NA time adjustment from standard input, as generated by a program such as <citerefentry><refentrytitle>taiclock</refentrytitle><manvolnum>1</manvolnum></citerefentry> or <citerefentry><refentrytitle>sntpclock</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
It then prints the local UNIX clock and the local UNIX clock plus that adjustment.
</para>

<para>
The adjustment must be a single 16-byte packet, readable in a single call to <citerefentry><refentrytitle>read</refentrytitle><manvolnum>2</manvolnum></citerefentry>.
<command>clockview</command> does not require that its standard input be a stream in blocking I/O mode.
</para>

<para>
Both clocks are printed in ISO style (with nanoseconds and attoseconds), in the local time zone, using <citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
Beware that many systems do not handle leap seconds correctly in <citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para>

</refsection>

<refsection>
<title>History</title>
<para>
<command>clockview</command> was originally part of <personname><firstname>Daniel</firstname> <othername>J.</othername> <surname>Bernstein</surname></personname>'s clockspeed toolset in 1998.
</para>
</refsection>

<refsection>
<title>Author</title>
<para>
Original code and documentation by <personname><firstname>Daniel</firstname> <othername>J.</othername> <surname>Bernstein</surname></personname>.
Documentation modernizations by <personname><firstname>Jonathan</firstname> <surname>de Boyne Pollard</surname></personname>.
</para>
</refsection>

</refentry>
