The following are the basic data types in Qore (see \mbox{\hyperlink{container_data_types}{Container Data Types}} and \mbox{\hyperlink{code_data_types}{Code Data Types}})\+:

{\bfseries{Basic Data Types}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Type}} &{\bfseries{Description}} &{\bfseries{Example}} &{\bfseries{Default Value}}  \\\cline{1-4}
\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} &\mbox{\hyperlink{basic_data_types_True}{True}} or \mbox{\hyperlink{basic_data_types_False}{False}} value &\mbox{\hyperlink{basic_data_types_True}{True}} &\mbox{\hyperlink{basic_data_types_False}{False}}  \\\cline{1-4}
\mbox{\hyperlink{basic_data_types_string}{String}} &A sequence of characters with a \mbox{\hyperlink{character_encoding}{character encoding}} &{\ttfamily \char`\"{}string\char`\"{}}  &Empty string (i.\+e. {\ttfamily \char`\"{}\char`\"{}})  \\\cline{1-4}
\mbox{\hyperlink{basic_data_types_integer}{Integer}} &A 64-\/bit signed integer &{\ttfamily 1}  &{\ttfamily 0}   \\\cline{1-4}
\mbox{\hyperlink{basic_data_types_float}{Float}} &A double-\/precision floating-\/point number &{\ttfamily 1.\+00023}  &{\ttfamily 0.\+0}   \\\cline{1-4}
\mbox{\hyperlink{basic_data_types_number}{Number}} &An arbitrary-\/precision number &{\ttfamily 5.\+23928173726123e50n}  &{\ttfamily 0.\+0n}   \\\cline{1-4}
\mbox{\hyperlink{basic_data_types_date}{Date}} &\mbox{\hyperlink{basic_data_types_absolute_dates}{absolute}} (with an associated \mbox{\hyperlink{time_zones}{time zone}}) or \mbox{\hyperlink{basic_data_types_relative_dates}{relative}} date/time values, both with resolution to the microsecond &{\ttfamily 2010-\/05-\/10T18\+:35}\+:21.\+001456-\/07\+:00 &{\ttfamily 1970-\/01-\/01Z}   \\\cline{1-4}
\mbox{\hyperlink{basic_data_types_binary}{Binary}} &An opaque binary object &{\ttfamily \texorpdfstring{$<$}{<}23deadbeef\texorpdfstring{$>$}{>}} &an empty object of size 0  \\\cline{1-4}
\mbox{\hyperlink{basic_data_types_null}{NULL}} &Corresponds to a {\ttfamily NULL} value in a database query (not equivalent to \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} &\mbox{\hyperlink{basic_data_types_NULL}{NULL}} &\mbox{\hyperlink{basic_data_types_NULL}{NULL}}  \\\cline{1-4}
\mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} &Represents the state of a variable having no value or function returning no value (not equivalent to \mbox{\hyperlink{basic_data_types_null}{NULL}}) &\mbox{\hyperlink{basic_data_types_NOTHING}{NOTHING}} &\mbox{\hyperlink{basic_data_types_NOTHING}{NOTHING}}  \\\cline{1-4}
\end{longtabu}


\DoxyHorRuler{0}
 \hypertarget{basic_data_types_boolean}{}\doxysection{Boolean}\label{basic_data_types_boolean}
\begin{DoxyParagraph}{Description\+:}
The Boolean type can have two values, \mbox{\hyperlink{basic_data_types_True}{True}} and \mbox{\hyperlink{basic_data_types_False}{False}}.~\newline
~\newline
 When converting other types to a Boolean, Qore uses Perl-\/style boolean conversion, based on an interpretation of the source value and taking into account its type (for example, when this option is set, an empty \mbox{\hyperlink{basic_data_types_string}{string}}, \mbox{\hyperlink{container_data_types_hash}{hash}}, or \mbox{\hyperlink{container_data_types_list}{list}} is always \mbox{\hyperlink{basic_data_types_False}{False}}, whereas if these are not empty they are interpreted as \mbox{\hyperlink{basic_data_types_True}{True}}); this way is considered to be more intuitive by most prorammers, so much so that the original strict mathematical interpretation of boolean values is considered to be a design bug in qore; see \mbox{\hyperlink{parse_directives_perl-bool-eval}{\%perl-\/bool-\/eval}} for more information.
\end{DoxyParagraph}
\begin{DoxyParagraph}{Immediate Value Example\+:}
\mbox{\hyperlink{basic_data_types_True}{True}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Pseudo Class for Type Boolean\+:}
\mbox{\hyperlink{class_qore_1_1zzz8boolzzz9}{Qore\+::zzz8boolzzz9}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Code\+:}
\mbox{\hyperlink{group__type__code__constants_ga2d3c90a766ca129ff13d243a27b41c90}{Qore\+::\+NT\+\_\+\+BOOLEAN}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Name\+:}
{\ttfamily \char`\"{}bool\char`\"{}} 
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{data_type_declarations_bool_type}{bool}}, \mbox{\hyperlink{data_type_declarations_softbool_type}{softbool}}
\end{DoxySeeAlso}
\hypertarget{basic_data_types_True}{}\doxysubsection{True}\label{basic_data_types_True}
The keyword {\ttfamily {\bfseries{True}} stands} for the boolean value true.\hypertarget{basic_data_types_False}{}\doxysubsection{False}\label{basic_data_types_False}
The keyword {\ttfamily {\bfseries{False}} stands} for the boolean value false.

\DoxyHorRuler{0}
 \hypertarget{basic_data_types_string}{}\doxysection{String}\label{basic_data_types_string}
\begin{DoxyParagraph}{Description\+:}
String values are specified with text between double or single quotes. Text between double quotes is subject to interpretation of escape characters; text between single quotes is not.~\newline
~\newline
 Strings are assumed by default to have the encoding given by the {\ttfamily QORE\+\_\+\+CHARSET} or the {\ttfamily LANG} environment variable (see \mbox{\hyperlink{environment_variables}{Environment Variables}}). If neither of these variables is set, then all strings will be assumed to have {\ttfamily UTF-\/8} encoding.~\newline
~\newline
 For detailed information on Qore character encoding handling, please see \mbox{\hyperlink{character_encoding}{Strings and Character Encoding}} .~\newline
~\newline
 It is legal to specify a string literal with newline characters like the following\+:~\newline
 
\begin{DoxyCode}{0}
\DoxyCodeLine{str = \textcolor{stringliteral}{"{}this string is}}
\DoxyCodeLine{\textcolor{stringliteral}{on more than 1 line"{};}}

\end{DoxyCode}
 ~\newline
 See \mbox{\hyperlink{group__string__functions_string_escape_chars}{string escape characters}} for a description of escape characters in double-\/quoted strings.~\newline
~\newline
 Internally, strings are stored as a pointer to a sequence of bytes terminated by a null (or zero byte), an unsigned integer giving the length of the string, and a pointer to an object giving the string\textquotesingle{}s \mbox{\hyperlink{character_encoding}{character encoding}}.~\newline
~\newline
 \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a2bd72f65b9028cc5606741a547a0fed3}{Qore\+::zzz8stringzzz9\+::strlen()}} is a constant-\/time operation (ie {\itshape O(1)}), however if the string has a multi-\/byte encoding, then \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a555db3550ff785af51a647415e994861}{Qore\+::zzz8stringzzz9\+::length()}} (returning the length of the string in characters, not bytes) computational complexity is {\itshape O(n)} (however if the character encoding is a single-\/byte encoding \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a555db3550ff785af51a647415e994861}{Qore\+::zzz8stringzzz9\+::length()}} is also {\itshape O(1)}).~\newline
~\newline
 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Immediate Value Example\+:}
{\ttfamily \char`\"{}this is a string\char`\"{}} 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Pseudo Class for Type String\+:}
\mbox{\hyperlink{class_qore_1_1zzz8stringzzz9}{Qore\+::zzz8stringzzz9}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Code\+:}
\mbox{\hyperlink{group__type__code__constants_ga86a3586f63bf9793e0cdb13f5e1f5db4}{Qore\+::\+NT\+\_\+\+STRING}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Name\+:}
{\ttfamily \char`\"{}string\char`\"{}} 
\end{DoxyParagraph}
\label{basic_data_types_string_slicing}%
\Hypertarget{basic_data_types_string_slicing}%
 \begin{DoxyParagraph}{String slicing\+:}
As an alternative way of acquiring substrings, strings can be \char`\"{}sliced\char`\"{} by dereferencing them using the \mbox{\hyperlink{operators_list_element_operator}{\mbox{[}\mbox{]} operator}} with a range or a list, as in the following examples\+:~\newline
 
\begin{DoxyCode}{0}
\DoxyCodeLine{string str = "{}hello\textcolor{stringliteral}{"{};}}
\DoxyCodeLine{\textcolor{stringliteral}{}}
\DoxyCodeLine{\textcolor{stringliteral}{}\textcolor{comment}{\# Creates a substring with the first two characters of the original string}}
\DoxyCodeLine{string str1a = str[0..1];}
\DoxyCodeLine{string str1b = str[0,1];}
\DoxyCodeLine{string str1c = str[..1];}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}string 1a: \%y\(\backslash\)n"{}}, str1a);}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}string 1b: \%y\(\backslash\)n"{}}, str1b);}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}string 1c: \%y\(\backslash\)n"{}}, str1c);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\# Creates a substring with the last two characters of the original string in reverse order}}
\DoxyCodeLine{string str2a = str[4..3];}
\DoxyCodeLine{string str2b = str[4,3];}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}string 2a: \%y\(\backslash\)n"{}}, str2a);}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}string 2b: \%y\(\backslash\)n"{}}, str2b);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\# Creates a substring from different characters in the string}}
\DoxyCodeLine{string str3 = str[4,3..1,0];}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}string 3: \%y\(\backslash\)n"{}}, str3);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\# -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\textcolor{comment}{\# the output is as follows:}}
\DoxyCodeLine{}
\DoxyCodeLine{string 1a: \textcolor{stringliteral}{"{}he"{}}}
\DoxyCodeLine{string 1b: \textcolor{stringliteral}{"{}he"{}}}
\DoxyCodeLine{string 1c: \textcolor{stringliteral}{"{}he"{}}}
\DoxyCodeLine{string 2a: \textcolor{stringliteral}{"{}ol"{}}}
\DoxyCodeLine{string 2b: \textcolor{stringliteral}{"{}ol"{}}}
\DoxyCodeLine{string 3: \textcolor{stringliteral}{"{}olleh"{}}}

\end{DoxyCode}
 ~\newline
 When making a substring with a list of character offsets and referring to a character offset that does not exist, no characters are added to the output string; these references are ignored.
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{data_type_declarations_string_type}{string}}, \mbox{\hyperlink{data_type_declarations_softstring_type}{softstring}}
\item \mbox{\hyperlink{group__string__functions}{String Functions}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\DoxyHorRuler{0}
 \hypertarget{basic_data_types_integer}{}\doxysection{Integer}\label{basic_data_types_integer}
\begin{DoxyParagraph}{Description\+:}
Qore integers are 64-\/bit signed integers.
\end{DoxyParagraph}
\begin{DoxyParagraph}{Immediate Value Example\+:}
{\ttfamily 100} 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Pseudo Class for Type Integer\+:}
\mbox{\hyperlink{class_qore_1_1zzz8intzzz9}{Qore\+::zzz8intzzz9}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Code\+:}
\mbox{\hyperlink{group__type__code__constants_ga38fbe0c5cf4d846a91edea6486bdd5c2}{Qore\+::\+NT\+\_\+\+INT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Name\+:}
{\ttfamily \char`\"{}integer\char`\"{}} 
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{data_type_declarations_int_type}{int}}, \mbox{\hyperlink{data_type_declarations_softint_type}{softint}}
\item \mbox{\hyperlink{group__math__constants_ga96d58fec2ca2cec95893872b16b84daa}{Qore\+::\+MAXINT}}, \mbox{\hyperlink{group__math__constants_gaba64488e1020a48909a9a33bb1f4e6ab}{Qore\+::\+MININT}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\DoxyHorRuler{0}
 \hypertarget{basic_data_types_float}{}\doxysection{Float}\label{basic_data_types_float}
\begin{DoxyParagraph}{Description\+:}
Qore floats are double precision floating-\/point numbers (C/\+C++ type {\itshape double}), normally a 64-\/bit value.
\end{DoxyParagraph}
\begin{DoxyParagraph}{Immediate Value Examples\+:}

\begin{DoxyItemize}
\item {\ttfamily -\/500.\+494} 
\item {\ttfamily 2.\+35e10} 
\end{DoxyItemize}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Pseudo Class for Type Float\+:}
\mbox{\hyperlink{class_qore_1_1zzz8floatzzz9}{Qore\+::zzz8floatzzz9}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Code\+:}
\mbox{\hyperlink{group__type__code__constants_ga8ac3e62bba7e8b878017533c2ac2f20f}{Qore\+::\+NT\+\_\+\+FLOAT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Name\+:}
{\ttfamily \char`\"{}float\char`\"{}} 
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{data_type_declarations_float_type}{float}}, \mbox{\hyperlink{data_type_declarations_softfloat_type}{softfloat}}
\item \mbox{\hyperlink{group__math__functions}{Math Functions}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\DoxyHorRuler{0}
 \hypertarget{basic_data_types_number}{}\doxysection{Number}\label{basic_data_types_number}
\begin{DoxyParagraph}{Description\+:}
Qore \char`\"{}number\char`\"{} values are arbitrary-\/precision numbers as provided by the \href{http://gmplib.org}{\texttt{ GMP}} and \href{http://www.mpfr.org}{\texttt{ MPFR}} libraries. Inside, they are implemented as floating-\/point values and therefore comparing them entails the same problems as comparing floats. You should not compare two number values for equality directly.~\newline
~\newline
 Operations with number values are generally slower than those with \mbox{\hyperlink{basic_data_types_float}{floats}} but support far greater accuracy. To give an immediate number value; write an integer or floating-\/point value and append an {\ttfamily \char`\"{}n\char`\"{}} to it, designating a \char`\"{}number\char`\"{} value.~\newline
~\newline
 In numeric operations where at least one argument is a number type, the other operands will generally be automatically converted to a number type and the result of the operation will also be a number type. When an operator acts on two values of type number, the result of the operation has the precision of the operand with the greatest precision.
\end{DoxyParagraph}
\begin{DoxyParagraph}{Immediate Value Example\+:}

\begin{DoxyItemize}
\item {\ttfamily -\/500.\+494n} 
\item {\ttfamily 2.\+35e10n} 
\end{DoxyItemize}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Pseudo Class for Type Number\+:}
\mbox{\hyperlink{class_qore_1_1zzz8numberzzz9}{Qore\+::zzz8numberzzz9}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Code\+:}
\mbox{\hyperlink{group__type__code__constants_ga57b8fff06d2f486b8ec1a1952b6f06aa}{Qore\+::\+NT\+\_\+\+NUMBER}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Name\+:}
{\ttfamily \char`\"{}number\char`\"{}} 
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{data_type_declarations_number_type}{number}}, \mbox{\hyperlink{data_type_declarations_softnumber_type}{softnumber}}
\item \mbox{\hyperlink{group__math__functions}{Math Functions}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 introduced the number type and integration with the \href{http://gmplib.org}{\texttt{ GMP}} and \href{http://www.mpfr.org}{\texttt{ MPFR}} libraries
\end{DoxySince}
\DoxyHorRuler{0}
 \hypertarget{basic_data_types_date}{}\doxysection{Date}\label{basic_data_types_date}
\begin{DoxyParagraph}{Description\+:}
Qore date/time values have date and time components supporting a resolution to the microsecond and can be either \mbox{\hyperlink{basic_data_types_absolute_dates}{absolute}} or \mbox{\hyperlink{basic_data_types_relative_dates}{relative}}.
\end{DoxyParagraph}
\begin{DoxyParagraph}{Immediate Value Examples\+:}

\begin{DoxyItemize}
\item {\ttfamily 2012-\/02-\/17T19\+:05\+:54+01\+:00}
\end{DoxyItemize}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Pseudo Class for Type Date\+:}
\mbox{\hyperlink{class_qore_1_1zzz8datezzz9}{Qore\+::zzz8datezzz9}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Code\+:}
\mbox{\hyperlink{group__type__code__constants_ga230aa338eb63ada8096e318095f8052c}{Qore\+::\+NT\+\_\+\+DATE}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Name\+:}
{\ttfamily \char`\"{}date\char`\"{}} 
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__date__and__time__functions}{Date and Time Functions}} for a list of functions related to date/time processing
\item \mbox{\hyperlink{date_time_arithmetic}{Date/\+Time Arithmetic}}
\item \mbox{\hyperlink{time_zones}{Time Zone Handling}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\hypertarget{basic_data_types_absolute_dates}{}\doxysubsection{Absolute Date/\+Time Values}\label{basic_data_types_absolute_dates}
Absolute date/time values specify a specific point in time in a certain time zone, such as January 1, 2005 10\+:35\+:00 +01\+:00. They are stored interally as a 64-\/bit signed offset from the Qore epoch ({\ttfamily 1970-\/01-\/01Z}), a non-\/negative 4-\/byte integer for microseconds, and a pointer to a time zone description object that provides the UTC offset and daylight savings time information (see \mbox{\hyperlink{time_zones}{Time Zone Handling}} for more information). Note that all absolute date/time values in Qore are stored internally in UTC and are converted for display purposes to the representation of wall time in their tagged time zone.

Absolute date/time values can be specified with a syntax based on \href{http://en.wikipedia.org/wiki/ISO_8601}{\texttt{ ISO-\/8601}} date formats as follows\+:

\begin{DoxyVerb}YYYY-MM-DD[THH:mm:SS[.n*]][Z|[+-]HH[:mm[:SS]]]\end{DoxyVerb}


Note that if no time zone information is given, the local time zone will be assumed. If a time zone UTC offset is given, it is given in units of time east of UTC (i.\+e. {\ttfamily +05}\+:00 means five hours east of UTC).

Or an alternative format (with a {\ttfamily \textquotesingle{}-\/\textquotesingle{}} instead of a {\ttfamily \textquotesingle{}T\textquotesingle{}} to separate the time component)\+:

\begin{DoxyVerb}YYYY-MM-DD[-HH:mm:SS[.n*]][Z|[+-]HH[:mm[:SS]]]\end{DoxyVerb}


for example, for just the date without a time component (assumed to be midnight on the given date in the local time zone)\+:
\begin{DoxyItemize}
\item {\ttfamily {\ttfamily 2010-\/05-\/26}} 
\end{DoxyItemize}

for just the date in UTC, without a time component\+:
\begin{DoxyItemize}
\item {\ttfamily {\ttfamily 2010-\/05-\/26Z}} 
\end{DoxyItemize}

or, for just the time, without a date component (note that in this case the date component will be set to Jan 1, 1970, in order for time arithmetic to function properly and will also be tagged with the local time zone)\+:
\begin{DoxyItemize}
\item {\ttfamily 20\+:05\+:10.\+458342}
\end{DoxyItemize}

Some further examples (note that the date/time values without a time zone specification here are tagged with the local time zone)\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'2005-\/03-\/29-\/18:12:25'}}
\DoxyCodeLine{2005-\/03-\/29 18:12:25 Tue +02:00 (CEST)}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'0512-\/01-\/01T01:49:59.002213Z'}}
\DoxyCodeLine{0512-\/01-\/01 01:49:59.002213 Fri Z (UTC)}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'2005-\/03-\/29'}}
\DoxyCodeLine{2005-\/03-\/29 00:00:00 Tue +02:00 (CEST)}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'18:35:26+08:00'}}
\DoxyCodeLine{1970-\/01-\/01 18:35:26 Thu +08:00 (+08)}

\end{DoxyCode}


The year must be a four-\/digit number, and all other values except microseconds must be two-\/digit numbers. If microseconds are present, at least one and up to 6 digits may be given after the decimal point. Pad the numbers with leading zeros if the numbers are smaller than the required number of digits. The hour component must be in 24-\/hour time format. Except for the month and day values, all other values start with 0 (hour = 00 -\/ 23, minute and second\+: 00 -\/ 59). Any deviation from this format will cause a parse exception.

When a date/time value is converted to an integer or vice-\/versa, a 64-\/bit offset in seconds from the start of the \char`\"{}epoch\char`\"{} is used for the conversion. Qore\textquotesingle{}s \char`\"{}zero date\char`\"{} (the start of Qore\textquotesingle{}s \char`\"{}epoch\char`\"{}) is January 1, 1970 UTC. When calculating second offsets from this date, a 64-\/bit integer is used.

\begin{DoxyNote}{Note}
The default local time zone for qore is set when the qore library is initialized; see \mbox{\hyperlink{time_zones}{Time Zone Handling}} for more information.
\end{DoxyNote}
\hypertarget{basic_data_types_relative_dates}{}\doxysubsection{Relative Date/\+Time Values (\+Durations)}\label{basic_data_types_relative_dates}
Relative dates (durations) are normally used for date addition and subtraction. See \mbox{\hyperlink{date_time_arithmetic}{Date/\+Time Arithmetic}} for more information.

Internally, durations are stored as a set of seven discrete signed integer values, one each for years, months, days, hours, minutes, seconds, and microseconds.

There are 3 different formats understood by the Qore parser for describing literal durations in Qore as follows\+:
\begin{DoxyItemize}
\item \mbox{\hyperlink{basic_data_types_single_reldates}{Single Relative Time Format}} (ex\+: {\ttfamily 750ms}; Qore-\/specific)
\item \mbox{\hyperlink{basic_data_types_short_reldates}{Short Relative Time Format}} (ex\+: {\ttfamily P3\+DT21H}; based on \href{http://en.wikipedia.org/wiki/ISO_8601}{\texttt{ ISO-\/8601}})
\item \mbox{\hyperlink{basic_data_types_long_reldates}{Long Relative Time Format}} (ex\+: {\ttfamily P0001-\/03-\/00\+T00\+:00\+:04}; based on \href{http://en.wikipedia.org/wiki/ISO_8601}{\texttt{ ISO-\/8601}})
\end{DoxyItemize}\hypertarget{basic_data_types_single_reldates}{}\doxysubsubsection{Single Relative Time Format}\label{basic_data_types_single_reldates}
A single relative date/time value (or a duration) may be specified as follows (note that this format is specific to Qore and not based on \href{http://en.wikipedia.org/wiki/ISO_8601}{\texttt{ ISO-\/8601}})\+:
\begin{DoxyItemize}
\item \begin{DoxyVerb}<integer><date component specifier>\end{DoxyVerb}

\end{DoxyItemize}{\bfseries{Examples\+:}}
\begin{DoxyItemize}
\item {\ttfamily 250ms\+:} 250 milliseconds
\item {\ttfamily 30s\+:} 30 seconds
\item {\ttfamily 2m\+:} 2 minutes
\item {\ttfamily 19.\+1s}\+: 19 seconds and 100 milliseconds
\end{DoxyItemize}Such values are recommended to give to functions and methods taking a timeout value as the units are then clear in the source code (whereas if an integer is given, it may not be clear that the function or method expects a value in milliseconds, for example); for example\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{auto val = q.pop(20s);}

\end{DoxyCode}
 is clearer than the alternative with an argument given as a value in implied milliseconds to the \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue_a2baeae55a0b5464a15aa055577177a7b}{Queue\+::pop()}} method\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{auto val = q.pop(20000);}

\end{DoxyCode}
 {\bfseries{Date Specifiers For Single Values For Relative Dates (non-\/\href{http://en.wikipedia.org/wiki/ISO_8601}{\texttt{ ISO-\/8601}} syntax)}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Component}} &{\bfseries{Meaning}} &{\bfseries{Example}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily Y}  &Years &{\ttfamily 2Y}  &2 Years  \\\cline{1-4}
{\ttfamily M}  &Months &{\ttfamily 3M}  &3 Months  \\\cline{1-4}
{\ttfamily D}  &Days &{\ttfamily 10D}  &10 Days  \\\cline{1-4}
{\ttfamily h}  &Hours &{\ttfamily 15h}  &15 hours  \\\cline{1-4}
{\ttfamily m}  &Minutes &{\ttfamily 25m}  &25 minutes  \\\cline{1-4}
{\ttfamily s}  &Seconds &{\ttfamily 19.\+1s}  &19 seconds and 100 milliseconds  \\\cline{1-4}
{\ttfamily ms}  &Milliseconds &{\ttfamily 250ms}  &250 milliseconds  \\\cline{1-4}
{\ttfamily us}  &Microseconds &{\ttfamily 21194us}  &21194 microseconds  \\\cline{1-4}
\end{longtabu}


\begin{DoxyNote}{Note}
In this relative date/time format, only seconds accept a fractional component
\end{DoxyNote}
\hypertarget{basic_data_types_short_reldates}{}\doxysubsubsection{Short Relative Time Format}\label{basic_data_types_short_reldates}
This and the next duration format for composite relative date/time values are both based on \href{http://en.wikipedia.org/wiki/ISO_8601}{\texttt{ ISO-\/8601}}.~\newline
~\newline
 This first format has the following syntax\+:
\begin{DoxyItemize}
\item {\ttfamily Pn\+Yn\+Mn\+DTn\+Hn\+MnS} 
\end{DoxyItemize}Each element above is optional, but at least one element must be present. Note that {\ttfamily \char`\"{}\+M\char`\"{}} means months when before the {\ttfamily \char`\"{}\+T\char`\"{}} and minutes when found after the {\ttfamily \char`\"{}\+T\char`\"{}}. The other elements are years, days, hours, and seconds. Fractional values are accepted as well, but these values are always converted to an integer value in the time component with higher precision (i.\+e. fractional seconds are converted to microseconds, fractional microseconds are ignored), and additionally the values may be negative.

\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item Standard \href{http://en.wikipedia.org/wiki/ISO_8601}{\texttt{ ISO-\/8601}} relative date/time formats only allows for the last component to have a fractional value.
\item Fractional years are converted to days assuming 365 days in a year
\item Fractional months are converted to days assuming an average 30 days in a month
\end{DoxyItemize}
\end{DoxyNote}
Here are some examples (using qore\textquotesingle{}s -\/X command-\/line option to evaluate and expression and print out the result)\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'P1Y3MT4S'}}
\DoxyCodeLine{<time: 1 year 3 months 4 seconds>}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'PT4M551u'}}
\DoxyCodeLine{<time: 4 minutes 551 microseconds>}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'P3DT21H'}}
\DoxyCodeLine{<time: 3 days 21 hours>}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'PT19.1S'}}
\DoxyCodeLine{<time: 19 seconds 100 milliseconds>}

\end{DoxyCode}


\begin{DoxyNote}{Note}
the {\ttfamily \char`\"{}u\char`\"{}} charater indicating microseconds is a deprecated Qore-\/specific extension to \href{http://en.wikipedia.org/wiki/ISO_8601}{\texttt{ ISO-\/8601}}; use fractional seconds instead
\end{DoxyNote}
\hypertarget{basic_data_types_long_reldates}{}\doxysubsubsection{Long Relative Time Format}\label{basic_data_types_long_reldates}
The second \href{http://en.wikipedia.org/wiki/ISO_8601}{\texttt{ ISO-\/8601}}-\/based format for specifing complex durations with multiple time units has the following syntax\+:
\begin{DoxyItemize}
\item {\ttfamily PYYYY-\/\+MM-\/\+DDTHH}\+:mm\+:SS
\end{DoxyItemize}This format is more limited than the first format, in that all values must be non-\/negative, and furthermore, all values must be present (although they may be zero).~\newline
~\newline
 Here are some examples of the second format (equivalent to the first examples)\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'P0001-\/03-\/00T00:00:04'}}
\DoxyCodeLine{<time: 1 year 3 months 4 seconds>}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'P0000-\/00-\/00T00:04:00.000551'}}
\DoxyCodeLine{<time: 4 minutes 551 microseconds>}
\DoxyCodeLine{prompt\% qore -\/X \textcolor{stringliteral}{'P0000-\/00-\/03T21:00:00'}}
\DoxyCodeLine{<time: 3 days 21 hours>}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{data_type_declarations_date_type}{date}}, \mbox{\hyperlink{data_type_declarations_softdate_type}{softdate}}
\end{DoxySeeAlso}
\hypertarget{basic_data_types_reldate_comparisons}{}\doxysubsubsection{Relative Date/\+Time Comparisons}\label{basic_data_types_reldate_comparisons}
Comparisons with two relative date/time values are made with normalized representations of each component of the date/time value. Because the actual value of a relative date/time value only makes sense when used with an \mbox{\hyperlink{basic_data_types_absolute_dates}{absolute date value}} (ex\+: adding {\ttfamily 1M} to an absolute date value will result in a different number of days being added depending on the month and day of the \mbox{\hyperlink{basic_data_types_absolute_dates}{absolute date value}} operand), comparisons of relative date/time values with mixed day, month, and year components must be based on approximations. When mixing day, month, and year components, the following approximations are used\+:
\begin{DoxyItemize}
\item one day is treated as equivalent to 24 hours ({\ttfamily 1D} == {\ttfamily 24h})
\item one month is treated as equivalent to 31 days ({\ttfamily 1M} == {\ttfamily 31D})
\item 365 days are treated as equivalent to one year ({\ttfamily 365D} == {\ttfamily 1Y})
\end{DoxyItemize}

These assumptions try to make sense of expressions like\+: \begin{DoxyVerb}45D > 1M \end{DoxyVerb}
 for example. Month lengths can range from 28 to 31 days, therefore while the expression\+: \begin{DoxyVerb}30D < 1M \end{DoxyVerb}
 will be evaluated as \mbox{\hyperlink{basic_data_types_True}{True}}, when adding {\ttfamily 30D} to an \mbox{\hyperlink{basic_data_types_absolute_dates}{absolute date value}}, the result could be less than adding {\ttfamily 1M} (for example, when the operand is an \mbox{\hyperlink{basic_data_types_absolute_dates}{absolute date}} in February).

\DoxyHorRuler{0}
 \hypertarget{basic_data_types_binary}{}\doxysection{Binary}\label{basic_data_types_binary}
\begin{DoxyParagraph}{Description\+:}
The binary data type is used to hold binary arbitrary binary data. Internally it is represented by a pointer to a memory location for the data and a size indicator.~\newline
~\newline
 Binary literal values are given in between angle brackets as an even series of hexadecimal digits\+:~\newline
 
\begin{DoxyCode}{0}
\DoxyCodeLine{binary b = <651144fe3310b5cc84>;}
\DoxyCodeLine{b += <abde77>;}
\DoxyCodeLine{\textcolor{comment}{\# b now contains <651144fe3310b5cc84abde77>}}

\end{DoxyCode}
 ~\newline
 Binary data can be concatenated with the + and += operators and manipulated with the \mbox{\hyperlink{operators_splice}{splice}} and \mbox{\hyperlink{operators_extract}{extract}} operators.~\newline
~\newline
 This data can be manipulated by being written and read from \mbox{\hyperlink{class_qore_1_1_file}{Qore\+::\+File}}, \mbox{\hyperlink{class_qore_1_1_socket}{Qore\+::\+Socket}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Qore\+::\+SQL\+::\+Datasource}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Qore\+::\+SQL\+::\+Datasource\+Pool}}, or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{Qore\+::\+SQL\+::\+SQLStatement}} objects, or converted and parsed to/from base64 encoded strings using the make\+Base64\+String() and parse\+Base64\+String() functions, or compressed and decompressed using the compress(), gzip(), bzip2(), etc. functions, and processed by most cryptographic funtions, among others.~\newline
~\newline
 Binary objects can be read from a \mbox{\hyperlink{class_qore_1_1_file}{Qore\+::\+File}} object using the \mbox{\hyperlink{class_qore_1_1_read_only_file_ac9513b569846b16e2b7363df5ba9f647}{Qore\+::\+File\+::read\+Binary()}} method and can be written using the \mbox{\hyperlink{class_qore_1_1_file_acd30e6f14435bae0393b1ed52bec502d}{Qore\+::\+File\+::write()}} method. Please see the \mbox{\hyperlink{class_qore_1_1_file}{Qore\+::\+File}} class for more information.~\newline
~\newline
 Binary objects can be read from a \mbox{\hyperlink{class_qore_1_1_socket}{Qore\+::\+Socket}} object using the \mbox{\hyperlink{class_qore_1_1_socket_aa255d1dcfbddb208e80684eebecc800d}{Qore\+::\+Socket\+::recv\+Binary()}} method and can be written using the \mbox{\hyperlink{class_qore_1_1_socket_aa5937114e3c3339bf463303d4208ca86}{Qore\+::\+Socket\+::send()}} method. Please see the \mbox{\hyperlink{class_qore_1_1_socket}{Qore\+::\+Socket}} class for more information.~\newline
~\newline
 The \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Qore\+::\+SQL\+::\+Datasource}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Qore\+::\+SQL\+::\+Datasource\+Pool}}, and \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{Qore\+::\+SQL\+::\+SQLStatement}} classes can also be used to read and write binary objects as BLOBs.~\newline
~\newline
 Note that this is not an exhaustive list; see the function and class library documentation for more examples.
\end{DoxyParagraph}
\begin{DoxyParagraph}{Immediate Value Example\+:}
{\ttfamily \texorpdfstring{$<$}{<}0feba023ffdca6291\texorpdfstring{$>$}{>}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Pseudo Class for Type Binary\+:}
\mbox{\hyperlink{class_qore_1_1zzz8binaryzzz9}{Qore\+::zzz8binaryzzz9}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Code\+:}
\mbox{\hyperlink{group__type__code__constants_ga71eb237451170acbe0e778711f73c462}{Qore\+::\+NT\+\_\+\+BINARY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Name\+:}
{\ttfamily \char`\"{}binary\char`\"{}} 
\end{DoxyParagraph}
\label{basic_data_types_binary_slicing}%
\Hypertarget{basic_data_types_binary_slicing}%
 \begin{DoxyParagraph}{Binary slicing\+:}
Binary objects can be \char`\"{}sliced\char`\"{} by dereferencing them using the \mbox{\hyperlink{operators_list_element_operator}{\mbox{[}\mbox{]} operator}} with a range or a list, as in the following examples\+:~\newline
 
\begin{DoxyCode}{0}
\DoxyCodeLine{binary bin = <beadface>;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\# Creates a binary slice with the first two bytes of the original binary object}}
\DoxyCodeLine{binary bin1a = bin[0..1];}
\DoxyCodeLine{binary bin1b = bin[0,1];}
\DoxyCodeLine{binary bin1c = bin[..1];}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}binary 1a: \%s\(\backslash\)n"{}}, bin1a.toHex());}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}binary 1b: \%s\(\backslash\)n"{}}, bin1b.toHex());}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}binary 1c: \%s\(\backslash\)n"{}}, bin1c.toHex());}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\# Creates a binary slice with the last two bytes of the original binary object in reverse order}}
\DoxyCodeLine{binary bin2a = bin[3..2];}
\DoxyCodeLine{binary bin2b = bin[3,2];}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}binary 2a: \%s\(\backslash\)n"{}}, bin2a.toHex());}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}binary 2b: \%s\(\backslash\)n"{}}, bin2b.toHex());}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\# Creates a binary slice with different bytes of the original binary object}}
\DoxyCodeLine{binary bin3 = bin[3,2..1,0];}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}binary 3: \%s\(\backslash\)n"{}}, bin3.toHex());}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\# -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\textcolor{comment}{\# the output is as follows:}}
\DoxyCodeLine{binary 1a: bead}
\DoxyCodeLine{binary 1b: bead}
\DoxyCodeLine{binary 1c: bead}
\DoxyCodeLine{binary 2a: cefa}
\DoxyCodeLine{binary 2b: cefa}
\DoxyCodeLine{binary 3: cefaadbe}

\end{DoxyCode}
 ~\newline
 When making a binary slice with a list of byte offsets and referring to a byte offset that does not exist, no bytes are added to the output binary slice; these references are ignored.
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{data_type_declarations_binary_type}{binary}}
\item \mbox{\hyperlink{data_type_declarations_hexbinary_type}{hexbinary}}
\item \mbox{\hyperlink{data_type_declarations_base64binary_type}{base64binary}}
\item \mbox{\hyperlink{data_type_declarations_softbinary_type}{softbinary}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\DoxyHorRuler{0}
 \hypertarget{basic_data_types_null}{}\doxysection{NULL}\label{basic_data_types_null}
\begin{DoxyParagraph}{Description\+:}
This data type represents an SQL {\ttfamily NULL} value and can only be accessed directly as an immediate value with the keyword \mbox{\hyperlink{basic_data_types_NULL}{NULL}}. Note that \mbox{\hyperlink{basic_data_types_NULL}{NULL}} is not equivalent to \mbox{\hyperlink{basic_data_types_NOTHING}{NOTHING}}.
\end{DoxyParagraph}
\begin{DoxyParagraph}{Immediate Value Example\+:}
\mbox{\hyperlink{basic_data_types_NULL}{NULL}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Pseudo Class for Type Null\+:}
\mbox{\hyperlink{class_qore_1_1zzz8valuezzz9}{Qore\+::zzz8valuezzz9}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Code\+:}
\mbox{\hyperlink{group__type__code__constants_gac59ac2035c37d18a8922c891c109686e}{Qore\+::\+NT\+\_\+\+NULL}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Name\+:}
{\ttfamily \char`\"{}\+NULL\char`\"{}} 
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Qore\+::\+SQL\+::\+Datasource}}
\item \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Qore\+::\+SQL\+::\+Datasource\+Pool}}
\item \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{Qore\+::\+SQL\+::\+SQLStatement}}
\item \mbox{\hyperlink{group__dbi__functions}{DBI Functions}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\hypertarget{basic_data_types_NULL}{}\doxysubsection{NULL}\label{basic_data_types_NULL}
The keyword {\ttfamily {\bfseries{NULL}} stands} for the SQL NULL value.

\DoxyHorRuler{0}
 \hypertarget{basic_data_types_nothing}{}\doxysection{NOTHING}\label{basic_data_types_nothing}
\begin{DoxyParagraph}{Description\+:}
This special data type represents no value and can only be accessed directly as an immediate value with the keyword \mbox{\hyperlink{basic_data_types_NOTHING}{NOTHING}}. Note that \mbox{\hyperlink{basic_data_types_NOTHING}{NOTHING}} is not equivalent to \mbox{\hyperlink{basic_data_types_NULL}{NULL}} .~\newline
 
\end{DoxyParagraph}
\begin{DoxyNote}{Note}
The exists operator will return \mbox{\hyperlink{basic_data_types_False}{False}} when given \mbox{\hyperlink{basic_data_types_NOTHING}{NOTHING}} as an argument; for example\+: \begin{DoxyVerb}prompt% qore -X 'exists NOTHING'
False\end{DoxyVerb}

\end{DoxyNote}
\begin{DoxyParagraph}{Immediate Value Example\+:}
\mbox{\hyperlink{basic_data_types_NOTHING}{NOTHING}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Pseudo Class for Type Nothing\+:}
\mbox{\hyperlink{class_qore_1_1zzz8valuezzz9}{Qore\+::zzz8valuezzz9}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Code\+:}
\mbox{\hyperlink{group__type__code__constants_ga823743aaa009c846f0ff649759e13a2e}{Qore\+::\+NT\+\_\+\+NOTHING}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Type Name\+:}
{\ttfamily \char`\"{}nothing\char`\"{}} 
\end{DoxyParagraph}
\hypertarget{basic_data_types_NOTHING}{}\doxysubsection{NOTHING}\label{basic_data_types_NOTHING}
The keyword {\ttfamily {\bfseries{NOTHING}} represents} no value.\hypertarget{basic_data_types_conversions}{}\doxysection{Data Conversions}\label{basic_data_types_conversions}
Boolean, string, integer, date, floating point, and arbitrary-\/percision numeric data types can be freely converted from one type to the other, although data loss is possible depending on the conversion (particularly when converting to the boolan type as only two possible values are supported).

The special types \mbox{\hyperlink{basic_data_types_null}{NULL}} and \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} are not equivalent and are generally not automatically converted to or from any other type.

When date types are converted from strings, any of the following formats can be used\+: {\ttfamily \char`\"{}\+YYYYMMDDHHmm\+SS\mbox{[}.\+us\mbox{]}\mbox{[}\+Z$\vert$+-\/\+HH\mbox{[}\+:\+MM\mbox{[}\+:\+SS\mbox{]}\mbox{]}\mbox{]}\char`\"{}}, {\ttfamily \char`\"{}\+YYYY-\/\+MM-\/\+DD HH\+:mm\+:\+SS.\+us\char`\"{}}, {\ttfamily \char`\"{}\+YYYY-\/\+MM-\/\+DDTHH\+:mm\+:\+SS\char`\"{}}, {\ttfamily \char`\"{}\+YYYY-\/\+MM-\/\+DDTHH\+:mm\+:\+SS\mbox{[}.\+us\mbox{]}\mbox{[}\+Z$\vert$+-\/\+HH\mbox{[}\+:\+MM\mbox{[}\+:\+SS\mbox{]}\mbox{]}\mbox{]}\char`\"{}}, and most reasonable combinations thereof. If the time zone component is missing, then the local time zone will be assumed (see \mbox{\hyperlink{time_zones}{Time Zone Handling}}).

When dates are converted to and from integer, floating-\/point, and arbitrary-\/percision numeric values, the a 64-\/bit second offset from January 1, 1970 in the local time zone is used for the conversion. For example 
\begin{DoxyCode}{0}
\DoxyCodeLine{int(2006-\/01-\/01)}

\end{DoxyCode}
 gives {\ttfamily 1136073600} (regardless of the local time zone the date is in). This is for backwards-\/compatibility with Qore before \mbox{\hyperlink{time_zones}{time zone support}} was available; to get the second offset of a date from {\ttfamily 1970-\/01-\/01Z} (i.\+e. the true epoch offset), call get\+\_\+epoch\+\_\+seconds() instead.

When an expression requires a certain data type and the source data type cannot be converted to the desired data type, the default value for the desired data type will be used. The default values are given in \mbox{\hyperlink{basic_data_types}{Basic Data Types}}. 