\hypertarget{class_qore_1_1_time_zone}{}\section{Qore\+:\+:Time\+Zone Class Reference}
\label{class_qore_1_1_time_zone}\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}


The \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} class provides access to time zone functionality.  




Inheritance diagram for Qore\+:\+:Time\+Zone\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=182pt]{class_qore_1_1_time_zone__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_time_zone_ac82e34e1f7c96d3aa5c0a071981a6f4f}{U\+T\+C\+Offset}} ()
\begin{DoxyCompactList}\small\item\em Returns the number of seconds east of U\+TC for the zone; negative numbers indicate a zone west of U\+TC. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_time_zone_ab77972801cee2c9d116a9631dfd631d9}{constructor}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_time_zone_a84317e0b38d8536b73fcf475b28b50a5}{region}})
\begin{DoxyCompactList}\small\item\em Creates the \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object based on the region name (ex\+: {\ttfamily \char`\"{}\+America/\+Chicago\char`\"{}}) \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_time_zone_a836a8bc75f97c8415d402d1153bcf578}{constructor}} (softint seconds\+\_\+east)
\begin{DoxyCompactList}\small\item\em Creates the \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object based on the number of seconds east of U\+TC (3600 = U\+TC +01) \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_time_zone_ab95aa62b0103ebda872a3c6b8c675ce2}{copy}} ()
\begin{DoxyCompactList}\small\item\em Creates a copy of the \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object. \end{DoxyCompactList}\item 
date \mbox{\hyperlink{class_qore_1_1_time_zone_afa23a3be62dcfc6712c168b3654a7b85}{date}} (softint secs, softint us=0)
\begin{DoxyCompactList}\small\item\em Returns the equivalent date in the time zone of the current object. \end{DoxyCompactList}\item 
date \mbox{\hyperlink{class_qore_1_1_time_zone_af148d835a7a7b8e01bd89f371d4227c7}{date}} (date d)
\begin{DoxyCompactList}\small\item\em Returns the equivalent date in the time zone of the current object. \end{DoxyCompactList}\item 
date \mbox{\hyperlink{class_qore_1_1_time_zone_a177b96464e04cdc717cd6adc51f83371}{date}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} dtstr)
\begin{DoxyCompactList}\small\item\em Returns the equivalent date in the time zone of the current object. \end{DoxyCompactList}\item 
date \mbox{\hyperlink{class_qore_1_1_time_zone_ab22bd3acfbfb1d7b7ce56f54c81897c7}{date}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} dtstr, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} mask)
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{basic_data_types_date}{date/time}} value in the current \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} corresponding to parsing a string argument according to a \mbox{\hyperlink{group__date__and__time__functions_date_mask}{format mask}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_time_zone_afa23a3be62dcfc6712c168b3654a7b85}{date}} \mbox{\hyperlink{class_qore_1_1_time_zone_a167a5a6a1b242a912ae51cbf1adea307}{date\+Ms}} (softint ms)
\begin{DoxyCompactList}\small\item\em Returns a date in the object\textquotesingle{}s zone based on an offsets in milliseconds from {\ttfamily 1970-\/01-\/01Z}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_time_zone_afa23a3be62dcfc6712c168b3654a7b85}{date}} \mbox{\hyperlink{class_qore_1_1_time_zone_a83f2b2cfdae00c84fd9476523990418f}{date\+Us}} (softint us)
\begin{DoxyCompactList}\small\item\em Returns a date in the object\textquotesingle{}s zone based on an offsets in microseconds from {\ttfamily 1970-\/01-\/01Z}. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1_time_zone_a9957690d95a39f692ce6860bcb202d45}{has\+D\+ST}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the zone has daylight saving time rules, \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_time_zone_a84317e0b38d8536b73fcf475b28b50a5}{region}} ()
\begin{DoxyCompactList}\small\item\em Returns the region name as a string; if the current zone is based on a U\+TC offset, then the U\+TC offset is returned as a string like {\ttfamily \char`\"{}+01\+:00\char`\"{}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} \mbox{\hyperlink{class_qore_1_1_time_zone_a71965bdd73c4d8da8f5bb72d54606ccf}{get}} ()
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object for the current time zone. \end{DoxyCompactList}\item 
static nothing \mbox{\hyperlink{class_qore_1_1_time_zone_a7e12da4b71bf101c397f06123474403f}{set}} (\mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} zone)
\begin{DoxyCompactList}\small\item\em Sets the time zone for the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} object from a \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object. \end{DoxyCompactList}\item 
static nothing \mbox{\hyperlink{class_qore_1_1_time_zone_a48adb2099dca02f0484925935e044220}{set\+Region}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_time_zone_a84317e0b38d8536b73fcf475b28b50a5}{region}})
\begin{DoxyCompactList}\small\item\em Sets the time zone for the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} object from a time zone region name. \end{DoxyCompactList}\item 
static nothing \mbox{\hyperlink{class_qore_1_1_time_zone_ad9b04e2df42c21fd1d67ad7b2a1e7f3f}{set\+U\+T\+C\+Offset}} (softint seconds\+\_\+east)
\begin{DoxyCompactList}\small\item\em Sets the time zone for the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} object from an integer offset in seconds east of U\+TC. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} class provides access to time zone functionality. 

\mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} objects based on zoneinfo region files (on U\+N\+IX) or registry information (on Windows) can have daylight savings time information; those based on U\+TC offsets have none.

The \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} class supports \mbox{\hyperlink{class_qore_1_1_serializable}{data serialization}}; deserialization can fail if the object is based on a region that is not present on the target machine. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_time_zone_ab77972801cee2c9d116a9631dfd631d9}\label{class_qore_1_1_time_zone_ab77972801cee2c9d116a9631dfd631d9}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!constructor@{constructor}}
\index{constructor@{constructor}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Qore\+::\+Time\+Zone\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{region }\end{DoxyParamCaption})}



Creates the \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object based on the region name (ex\+: {\ttfamily \char`\"{}\+America/\+Chicago\char`\"{}}) 


\begin{DoxyParams}{Parameters}
{\em region} & The region name for the time zone (ex\+: {\ttfamily \char`\"{}\+America/\+Chicago\char`\"{}}); if the zoneinfo file for the region cannot be found or parsed (on U\+N\+IX) or if the registry entry cannot be found (on Windows), then an exception is thrown\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
On Windows zoneinfo region names (ex\+: {\ttfamily \char`\"{}\+Europe/\+Prague\char`\"{}}) are converted to registry entries under {\ttfamily H\+K\+E\+Y\+\_\+\+L\+O\+C\+A\+L\+\_\+\+M\+A\+C\+H\+I\+NE S\+O\+F\+T\+W\+A\+RE\textbackslash{}Microsoft\textbackslash{}Windows NT\textbackslash{}Current\+Version\textbackslash{}Time Zones} (ex\+: {\ttfamily \char`\"{}\+Central Europe Standard Time\char`\"{}}); on Windows you can also pass a registry key directly (ex\+: {\ttfamily \char`\"{}\+Central Europe Standard Time\char`\"{}}) as the region, in this case it will be used to find the timezone info in registry, however the region name will then be converted to the first corresponding zoneinfo region according to alphabet (ex\+: {\ttfamily \char`\"{}\+Central Europe Standard Time\char`\"{}} -\/$>$ {\ttfamily \char`\"{}\+Europe/\+Belgrade\char`\"{}}); if an absolute path to a file is given as the argument, then a zoneinfo file is read and parsed from the given location
\end{DoxyNote}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
TimeZone tz(\textcolor{stringliteral}{"Europe/Prague"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em T\+Z\+I\+N\+F\+O-\/\+E\+R\+R\+OR} & Unable to read zoneinfo file; invalid file magic; error parsing zoneinfo file, etc \\
\hline
{\em I\+L\+L\+E\+G\+A\+L-\/\+F\+I\+L\+E\+S\+Y\+S\+T\+E\+M-\/\+A\+C\+C\+E\+SS} & thrown if a path was passed for {\itshape region} and the \mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+F\+I\+L\+E\+S\+Y\+S\+T\+EM}} sandboxing restriction is set\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 an absolute path to a zoneinfo file can be provided if the \mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+F\+I\+L\+E\+S\+Y\+S\+T\+EM}} sandboxing restriction is not in place (checked at runtime if an absolute path is passed) 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_time_zone_a836a8bc75f97c8415d402d1153bcf578}\label{class_qore_1_1_time_zone_a836a8bc75f97c8415d402d1153bcf578}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!constructor@{constructor}}
\index{constructor@{constructor}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Qore\+::\+Time\+Zone\+::constructor (\begin{DoxyParamCaption}\item[{softint}]{seconds\+\_\+east }\end{DoxyParamCaption})}



Creates the \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object based on the number of seconds east of U\+TC (3600 = U\+TC +01) 


\begin{DoxyParams}{Parameters}
{\em seconds\+\_\+east} & The number of seconds east of U\+TC for the time zone; for zones west of U\+TC, use negative numbers\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
TimeZone tz(3600);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_ab95aa62b0103ebda872a3c6b8c675ce2}\label{class_qore_1_1_time_zone_ab95aa62b0103ebda872a3c6b8c675ce2}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!copy@{copy}}
\index{copy@{copy}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily Qore\+::\+Time\+Zone\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Creates a copy of the \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
TimeZone newzone = tz.copy();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_afa23a3be62dcfc6712c168b3654a7b85}\label{class_qore_1_1_time_zone_afa23a3be62dcfc6712c168b3654a7b85}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!date@{date}}
\index{date@{date}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{date()}{date()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily date Qore\+::\+Time\+Zone\+::date (\begin{DoxyParamCaption}\item[{softint}]{secs,  }\item[{softint}]{us = {\ttfamily 0} }\end{DoxyParamCaption})}



Returns the equivalent date in the time zone of the current object. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em secs} & offset are in seconds from 1970-\/01-\/01Z \\
\hline
{\em us} & offset are in microseconds from {\ttfamily 1970-\/01-\/01Z} \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
date dt = tz.date(secs);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_af148d835a7a7b8e01bd89f371d4227c7}\label{class_qore_1_1_time_zone_af148d835a7a7b8e01bd89f371d4227c7}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!date@{date}}
\index{date@{date}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{date()}{date()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily date Qore\+::\+Time\+Zone\+::date (\begin{DoxyParamCaption}\item[{date}]{d }\end{DoxyParamCaption})}



Returns the equivalent date in the time zone of the current object. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em d} & A date that will be used to create the date in the time zone of the objects; the same point in time will be returned but in the time zone of the object\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
date dt = tz.date(2012-01-01T13:56:23+01:00);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_a177b96464e04cdc717cd6adc51f83371}\label{class_qore_1_1_time_zone_a177b96464e04cdc717cd6adc51f83371}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!date@{date}}
\index{date@{date}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{date()}{date()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily date Qore\+::\+Time\+Zone\+::date (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{dtstr }\end{DoxyParamCaption})}



Returns the equivalent date in the time zone of the current object. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em dtstr} & The string to be used to return a date in the object\textquotesingle{}s time zone\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
date dt = tz.date(\textcolor{stringliteral}{"2012-01-01T13:56:23"});
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+4 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_time_zone_ab22bd3acfbfb1d7b7ce56f54c81897c7}\label{class_qore_1_1_time_zone_ab22bd3acfbfb1d7b7ce56f54c81897c7}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!date@{date}}
\index{date@{date}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{date()}{date()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily date Qore\+::\+Time\+Zone\+::date (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{dtstr,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{mask }\end{DoxyParamCaption})}



Returns a \mbox{\hyperlink{basic_data_types_date}{date/time}} value in the current \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} corresponding to parsing a string argument according to a \mbox{\hyperlink{group__date__and__time__functions_date_mask}{format mask}}. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em dtstr} & a string giving a date \\
\hline
{\em mask} & the mask for the date value; see \mbox{\hyperlink{group__date__and__time__functions_date_mask}{Date Mask Format}} for information on the format of the \mbox{\hyperlink{group__date__and__time__functions_date_mask}{format mask}}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{basic_data_types_date}{date/time}} value in the current \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} corresponding to parsing the {\itshape dtstr} string argument according to {\itshape mask} serving as a \mbox{\hyperlink{group__date__and__time__functions_date_mask}{format mask}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
TimeZone tz(\textcolor{stringliteral}{"Europe/London"});
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y\(\backslash\)n"}, tz.date(\textcolor{stringliteral}{"05/02/2012"}, \textcolor{stringliteral}{"DD/MM/YYYY"})); \textcolor{comment}{# outputs: 2012-02-05 00:00:00 Sun Z (GMT)}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em D\+A\+T\+E-\/\+C\+O\+N\+V\+E\+R\+T-\/\+E\+R\+R\+OR} & invalid mask specification\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
similar to but more useful than \mbox{\hyperlink{group__date__and__time__functions_gaa990826f93b4f22f786fcfe431c4886d}{Qore\+::date(string, string)}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_time_zone_a167a5a6a1b242a912ae51cbf1adea307}\label{class_qore_1_1_time_zone_a167a5a6a1b242a912ae51cbf1adea307}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!date\+Ms@{date\+Ms}}
\index{date\+Ms@{date\+Ms}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{date\+Ms()}{dateMs()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_time_zone_afa23a3be62dcfc6712c168b3654a7b85}{date}} Qore\+::\+Time\+Zone\+::date\+Ms (\begin{DoxyParamCaption}\item[{softint}]{ms }\end{DoxyParamCaption})}



Returns a date in the object\textquotesingle{}s zone based on an offsets in milliseconds from {\ttfamily 1970-\/01-\/01Z}. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em ms} & an offsets in milliseconds from {\ttfamily 1970-\/01-\/01Z} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a date in the object\textquotesingle{}s zone based on the given offsets in milliseconds from {\ttfamily 1970-\/01-\/01Z} 
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
date dt = tz.dateMs(offset\_ms);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_a83f2b2cfdae00c84fd9476523990418f}\label{class_qore_1_1_time_zone_a83f2b2cfdae00c84fd9476523990418f}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!date\+Us@{date\+Us}}
\index{date\+Us@{date\+Us}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{date\+Us()}{dateUs()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_time_zone_afa23a3be62dcfc6712c168b3654a7b85}{date}} Qore\+::\+Time\+Zone\+::date\+Us (\begin{DoxyParamCaption}\item[{softint}]{us }\end{DoxyParamCaption})}



Returns a date in the object\textquotesingle{}s zone based on an offsets in microseconds from {\ttfamily 1970-\/01-\/01Z}. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em us} & an offsets in microseconds from {\ttfamily 1970-\/01-\/01Z} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a date in the object\textquotesingle{}s zone based on the given offsets in microseconds from {\ttfamily 1970-\/01-\/01Z} 
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
date dt = tz.dateUs(offset\_uss);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_a71965bdd73c4d8da8f5bb72d54606ccf}\label{class_qore_1_1_time_zone_a71965bdd73c4d8da8f5bb72d54606ccf}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!get@{get}}
\index{get@{get}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{get()}{get()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} Qore\+::\+Time\+Zone\+::get (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns a \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object for the current time zone. 

\begin{DoxyReturn}{Returns}
a \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object for the current time zone
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
TimeZone tz = TimeZone::get();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_a9957690d95a39f692ce6860bcb202d45}\label{class_qore_1_1_time_zone_a9957690d95a39f692ce6860bcb202d45}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!has\+D\+ST@{has\+D\+ST}}
\index{has\+D\+ST@{has\+D\+ST}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{has\+D\+S\+T()}{hasDST()}}
{\footnotesize\ttfamily bool Qore\+::\+Time\+Zone\+::has\+D\+ST (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the zone has daylight saving time rules, \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. 

\mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} objects based on zoneinfo region files (on U\+N\+IX) or registry information (on Windows) can have (but do not necessarily have) daylight savings time information; those based on U\+TC offsets have none

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the current zone has daylight saving time rules, \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
bool hasdst = tz.hasDST();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_a84317e0b38d8536b73fcf475b28b50a5}\label{class_qore_1_1_time_zone_a84317e0b38d8536b73fcf475b28b50a5}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!region@{region}}
\index{region@{region}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{region()}{region()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Time\+Zone\+::region (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the region name as a string; if the current zone is based on a U\+TC offset, then the U\+TC offset is returned as a string like {\ttfamily \char`\"{}+01\+:00\char`\"{}}. 

\begin{DoxyReturn}{Returns}
the region name as a string; if the current zone is based on a U\+TC offset, then the U\+TC offset is returned as a string like {\ttfamily \char`\"{}+01\+:00\char`\"{}} 
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string region = tz.region();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_a7e12da4b71bf101c397f06123474403f}\label{class_qore_1_1_time_zone_a7e12da4b71bf101c397f06123474403f}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!set@{set}}
\index{set@{set}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{set()}{set()}}
{\footnotesize\ttfamily static nothing Qore\+::\+Time\+Zone\+::set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}}}]{zone }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Sets the time zone for the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} object from a \mbox{\hyperlink{class_qore_1_1_time_zone}{Time\+Zone}} object. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga99046cc8285fb26438508cdf29b5771e}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+L\+O\+C\+A\+L\+E\+\_\+\+C\+O\+N\+T\+R\+OL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em zone} & the time zone to set\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
TimeZone tz(\textcolor{stringliteral}{"Europe/Prague"});
TimeZone::set(tz);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_a48adb2099dca02f0484925935e044220}\label{class_qore_1_1_time_zone_a48adb2099dca02f0484925935e044220}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!set\+Region@{set\+Region}}
\index{set\+Region@{set\+Region}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{set\+Region()}{setRegion()}}
{\footnotesize\ttfamily static nothing Qore\+::\+Time\+Zone\+::set\+Region (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{region }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Sets the time zone for the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} object from a time zone region name. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga99046cc8285fb26438508cdf29b5771e}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+L\+O\+C\+A\+L\+E\+\_\+\+C\+O\+N\+T\+R\+OL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em region} & the region name to set\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
On Windows you can use both zoneinfo region names (ex\+: {\ttfamily \char`\"{}\+Europe/\+Prague\char`\"{}}) as well as the Windows registry keys under {\ttfamily H\+K\+E\+Y\+\_\+\+L\+O\+C\+A\+L\+\_\+\+M\+A\+C\+H\+I\+NE S\+O\+F\+T\+W\+A\+RE\textbackslash{}Microsoft\textbackslash{}Windows NT\textbackslash{}Current\+Version\textbackslash{}Time Zones} (ex\+: {\ttfamily \char`\"{}\+Central Europe Standard Time); note that in this case the Windows-\/style names will only be used to load the timezone info from registry and the name will then be converted to the first corresponding zoneinfo region according to alphabet (ex\+: \textbackslash{}c \char`\"{}Central} Europe Standard Time\char`\"{} -\/$>$ \textbackslash{}c \char`\"{}Europe/\+Belgrade").
\end{DoxyNote}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
TimeZone::setRegion(\textcolor{stringliteral}{"Europe/Prague"});
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_ad9b04e2df42c21fd1d67ad7b2a1e7f3f}\label{class_qore_1_1_time_zone_ad9b04e2df42c21fd1d67ad7b2a1e7f3f}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!set\+U\+T\+C\+Offset@{set\+U\+T\+C\+Offset}}
\index{set\+U\+T\+C\+Offset@{set\+U\+T\+C\+Offset}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{set\+U\+T\+C\+Offset()}{setUTCOffset()}}
{\footnotesize\ttfamily static nothing Qore\+::\+Time\+Zone\+::set\+U\+T\+C\+Offset (\begin{DoxyParamCaption}\item[{softint}]{seconds\+\_\+east }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Sets the time zone for the current \mbox{\hyperlink{class_qore_1_1_program}{Program}} object from an integer offset in seconds east of U\+TC. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga99046cc8285fb26438508cdf29b5771e}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+L\+O\+C\+A\+L\+E\+\_\+\+C\+O\+N\+T\+R\+OL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em seconds\+\_\+east} & the number of seconds east of U\+TC for the new time zone (negative numbers give seconds west of U\+TC)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
TimeZone::setUTCOffset(3600);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_time_zone_ac82e34e1f7c96d3aa5c0a071981a6f4f}\label{class_qore_1_1_time_zone_ac82e34e1f7c96d3aa5c0a071981a6f4f}} 
\index{Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}!U\+T\+C\+Offset@{U\+T\+C\+Offset}}
\index{U\+T\+C\+Offset@{U\+T\+C\+Offset}!Qore\+::\+Time\+Zone@{Qore\+::\+Time\+Zone}}
\subsubsection{\texorpdfstring{U\+T\+C\+Offset()}{UTCOffset()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Time\+Zone\+::\+U\+T\+C\+Offset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the number of seconds east of U\+TC for the zone; negative numbers indicate a zone west of U\+TC. 

\begin{DoxyReturn}{Returns}
the number of seconds east of U\+TC for the zone; negative numbers indicate a zone west of U\+TC
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int offset = tz.UTCOffset();
\end{DoxyCode}
 
\end{DoxyParagraph}
