\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#423: Formatting Timestamps with Milliseconds}
\date{June 07, 2013}
\author{Thomas Perschak}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#423}&\textbf{Formatting Timestamps with Milliseconds}\\\hline
Author&

Thomas Perschak \tipmail{tombert.group}{live.at}
\\
Created&Friday, \(\text{7}^{\text{th}}\) June 2013\\
Type&Project\\
Tcl Version&\(8.7\)\\
State&Draft\\
Vote&Pending\\
Version&\tipversion$Revision: 1.1 $\\
Keywords&Tcl, time, millisecond resolution\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

This TIP describes a change to \textbf{clock format} to allow it to handle timestamps with sub-second accuracy.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

Currently, the \textbf{clock format} accepts only integer numbers for clock formatting. Since the \textbf{clock milliseconds} command was introduced in Tcl 8.5, this limitation seems a bit restrictive.

In particular, the timestamp column in a number of databases (e.g., \url{http://www.postgresql.org/docs/9.1/static/datatype-datetime.html}) handles high-resolution timestamps by allowing full ISO 8601 times, which look like ``04:05:06.789''; this would simplify database write operations.

\section{Proposal}

The \textbf{clock format} command should accept floating point values for timestamps.

Another format letter should be added to \textbf{clock format} which puts the milliseconds into the output string; the millisecond value should not be written unless explicitly requested.

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\end{document}
