\section{U\-T\-I\-L\-:\-:L\-C\-Time Class Reference}
\label{classUTIL_1_1LCTime}\index{U\-T\-I\-L\-::\-L\-C\-Time@{U\-T\-I\-L\-::\-L\-C\-Time}}


Helper class that allows to convert time stamps as defined in L\-C\-Event\-::get\-Time\-Stamp() ( ns since 1.\-1.\-1970 00\-:00\-:00 U\-T\-C) to ordinary date and time and vice versa.  




{\ttfamily \#include $<$U\-T\-I\-L/\-L\-C\-Time.\-h$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct {\bf Calendar\-Time}
\begin{DoxyCompactList}\small\item\em Helper struct that holds the calendar time. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf L\-C\-Time} ()\label{classUTIL_1_1LCTime_a02f8671e10cebae8c0a685aebf8ebc9d}

\begin{DoxyCompactList}\small\item\em Init with current time ( accuracy depends on O\-S/machine,etc.) in U\-T\-C/\-G\-M\-T. \end{DoxyCompactList}\item 
{\bf L\-C\-Time} ({\bf E\-V\-E\-N\-T\-::long64} time)\label{classUTIL_1_1LCTime_a43f9c7293e0b3738793822b32055d958}

\begin{DoxyCompactList}\small\item\em Init from 64 bit time stamp ( ns since 1.\-1.\-1970 00\-:00\-:00 ). \end{DoxyCompactList}\item 
{\bf L\-C\-Time} (int {\bf year}, int {\bf month}, int {\bf day}, int {\bf hour}=0, int {\bf min}=0, int s=0)\label{classUTIL_1_1LCTime_a0e8cdd396ae60cc2f2a746390da3e726}

\begin{DoxyCompactList}\small\item\em Init from date and time. \end{DoxyCompactList}\item 
{\bf L\-C\-Time} (int {\bf unix\-Time})\label{classUTIL_1_1LCTime_a82480114cbab69501e4271c798a19bde}

\begin{DoxyCompactList}\small\item\em Init from unix time ( s since 1.\-1.\-1970 00\-:00\-:00 ). \end{DoxyCompactList}\item 
int {\bf unix\-Time} () const \label{classUTIL_1_1LCTime_af5c0dd90dbeb88acfbe8054499041992}

\begin{DoxyCompactList}\small\item\em Unix time ( s since 1.\-1.\-1970 00\-:00\-:00 ). \end{DoxyCompactList}\item 
{\bf E\-V\-E\-N\-T\-::long64} {\bf time\-Stamp} () const \label{classUTIL_1_1LCTime_a28c5c9af8865de4da120b37c63a5387d}

\begin{DoxyCompactList}\small\item\em 64bit time stamp as used in L\-C\-Event\-::get\-Timestamp(). \end{DoxyCompactList}\item 
bool {\bf is\-Leap\-Year} (int {\bf year}) const \label{classUTIL_1_1LCTime_ac0f05d81808177ace549314d6c40db26}

\begin{DoxyCompactList}\small\item\em True if the year is a leap year in the Gregorian calendar\-:\par
 year is multiple of 4 and not multiple of 100\par
 or year is multiple of 400. \end{DoxyCompactList}\item 
int {\bf days\-In\-Year} (int {\bf year}) const 
\begin{DoxyCompactList}\small\item\em The number if days in the given year in the Gregorian calendar. \end{DoxyCompactList}\item 
int {\bf days\-In\-Month} (int {\bf month}, int {\bf year}) const 
\begin{DoxyCompactList}\small\item\em The number if days in the given month and year in the Gregorian calendar. \end{DoxyCompactList}\item 
std\-::string {\bf get\-Date\-String} () const 
\begin{DoxyCompactList}\small\item\em Date in human readable format, e.\-g. \end{DoxyCompactList}\item 
const {\bf Calendar\-Time} \& {\bf calendar\-Time} () const \label{classUTIL_1_1LCTime_ae5572a30e97afa3536354d3d5fad9b7a}

\begin{DoxyCompactList}\small\item\em Calendar time\-: year,month,day hour,min,sec and ns. \end{DoxyCompactList}\item 
int {\bf year} () const \label{classUTIL_1_1LCTime_ab7b22b23f44d76a02ef9b44f6b8ef181}

\begin{DoxyCompactList}\small\item\em Calendar time\-: year. \end{DoxyCompactList}\item 
int {\bf month} () const \label{classUTIL_1_1LCTime_abfd4988aa729700e5524ff774ff34dc1}

\begin{DoxyCompactList}\small\item\em Calendar time\-: month. \end{DoxyCompactList}\item 
int {\bf day} () const \label{classUTIL_1_1LCTime_aba886b612e2482c53f41903b6c88b462}

\begin{DoxyCompactList}\small\item\em Calendar time\-: day. \end{DoxyCompactList}\item 
int {\bf hour} () const \label{classUTIL_1_1LCTime_a279efc7ab12552af26e5510cda1b93d1}

\begin{DoxyCompactList}\small\item\em Calendar time\-: hour. \end{DoxyCompactList}\item 
int {\bf min} () const \label{classUTIL_1_1LCTime_a430dace6f81531fe73c39a9736590640}

\begin{DoxyCompactList}\small\item\em Calendar time\-: min. \end{DoxyCompactList}\item 
int {\bf sec} () const \label{classUTIL_1_1LCTime_a966bdb96f33bb8a299e27e5a1c900fbd}

\begin{DoxyCompactList}\small\item\em Calendar time\-: sec. \end{DoxyCompactList}\item 
int {\bf ns} () const \label{classUTIL_1_1LCTime_a1468129e2987393966743301a6e1e402}

\begin{DoxyCompactList}\small\item\em Calendar time\-: ns. \end{DoxyCompactList}\item 
void {\bf operator+=} ({\bf E\-V\-E\-N\-T\-::long64} t)\label{classUTIL_1_1LCTime_a217da1626caf721998a69e60cf7909ee}

\begin{DoxyCompactList}\small\item\em Add the specified number of ns to the time. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static bool {\bf test} (int n\-Dates)\label{classUTIL_1_1LCTime_a01a1ad5e3ed46810fd432e17f848ecdc}

\begin{DoxyCompactList}\small\item\em Tests the \doxyref{L\-C\-Time}{p.}{classUTIL_1_1LCTime} class with n\-Dates random dates Returns true if successful -\/ throws Exception in case of error. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void {\bfseries convert\-To\-Cal\-Time} ()\label{classUTIL_1_1LCTime_a90681ea54b3b92159e7d204af03b716c}

\item 
void {\bfseries convert\-From\-Cal\-Time} ()\label{classUTIL_1_1LCTime_a0cabf774f13ddb11eca76641f67f8ab8}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
{\bf E\-V\-E\-N\-T\-::long64} {\bfseries \-\_\-t}\label{classUTIL_1_1LCTime_ae749d7972b519a8eb99172b8e5d692d2}

\item 
{\bf Calendar\-Time} {\bfseries \-\_\-d}\label{classUTIL_1_1LCTime_ae4bfcde166f60b926226e47807f89338}

\end{DoxyCompactItemize}
\subsection*{Static Protected Attributes}
\begin{DoxyCompactItemize}
\item 
static int {\bfseries dpm} [13] = \{ 0,31,28,31,30,31,30,31,31,30,31,30,31 \}\label{classUTIL_1_1LCTime_a58f85797c457736d4c10767eaf3d5673}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Helper class that allows to convert time stamps as defined in L\-C\-Event\-::get\-Time\-Stamp() ( ns since 1.\-1.\-1970 00\-:00\-:00 U\-T\-C) to ordinary date and time and vice versa. 

\par
 Dates and times are in U\-T\-C/\-G\-M\-T by default.\par
 Negative time stamps are not supported and mapped to 0\-L\-L and 1.\-1.\-1970 00\-:00\-:00 U\-T\-C respectively.

\begin{DoxyAuthor}{Author}
gaede 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}

\end{DoxyVersion}
\begin{DoxyParagraph}{Id\-:}
\doxyref{L\-C\-Time.\-h}{p.}{LCTime_8h_source},v 1.\-4 2005-\/04-\/22 15\-:39\-:01 gaede Exp 
\end{DoxyParagraph}


\subsection{Member Function Documentation}
\index{U\-T\-I\-L\-::\-L\-C\-Time@{U\-T\-I\-L\-::\-L\-C\-Time}!days\-In\-Month@{days\-In\-Month}}
\index{days\-In\-Month@{days\-In\-Month}!UTIL::LCTime@{U\-T\-I\-L\-::\-L\-C\-Time}}
\subsubsection[{days\-In\-Month}]{\setlength{\rightskip}{0pt plus 5cm}int U\-T\-I\-L\-::\-L\-C\-Time\-::days\-In\-Month (
\begin{DoxyParamCaption}
\item[{int}]{month, }
\item[{int}]{year}
\end{DoxyParamCaption}
) const}\label{classUTIL_1_1LCTime_a7e39114f7d004d7db8a48394816afeba}


The number if days in the given month and year in the Gregorian calendar. 



References is\-Leap\-Year(), and month().



Referenced by L\-C\-Time(), and test().

\index{U\-T\-I\-L\-::\-L\-C\-Time@{U\-T\-I\-L\-::\-L\-C\-Time}!days\-In\-Year@{days\-In\-Year}}
\index{days\-In\-Year@{days\-In\-Year}!UTIL::LCTime@{U\-T\-I\-L\-::\-L\-C\-Time}}
\subsubsection[{days\-In\-Year}]{\setlength{\rightskip}{0pt plus 5cm}int U\-T\-I\-L\-::\-L\-C\-Time\-::days\-In\-Year (
\begin{DoxyParamCaption}
\item[{int}]{year}
\end{DoxyParamCaption}
) const}\label{classUTIL_1_1LCTime_a60e29b4f34f6504b6254e9dd004f83b5}


The number if days in the given year in the Gregorian calendar. 



References is\-Leap\-Year().

\index{U\-T\-I\-L\-::\-L\-C\-Time@{U\-T\-I\-L\-::\-L\-C\-Time}!get\-Date\-String@{get\-Date\-String}}
\index{get\-Date\-String@{get\-Date\-String}!UTIL::LCTime@{U\-T\-I\-L\-::\-L\-C\-Time}}
\subsubsection[{get\-Date\-String}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string U\-T\-I\-L\-::\-L\-C\-Time\-::get\-Date\-String (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\label{classUTIL_1_1LCTime_a48fd2c41bacf07726f452a9c8e5b5fc2}


Date in human readable format, e.\-g. 

10.\-02.\-2005 10\-:54\-:29.\-123456789 \-:\par
 dd.\-mm.\-yyyy hh\-:mm\-:ss.\-\_\-ms\-\_\-us\-\_\-ns 

Referenced by U\-T\-I\-L\-::\-L\-C\-T\-O\-O\-L\-S\-::dump\-Event\-Detailed(), L\-C\-Time(), and test().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
L\-C\-Time.\-h\item 
L\-C\-Time.\-cc\end{DoxyCompactItemize}
