Qore Programming Language Reference Manual  0.8.13
QC_TimeZone.dox.h
1 namespace Qore {
4 
6 class TimeZone {
7 
8 public:
10 
20 int UTCOffset();
21 
22 public:
24 
38  constructor(string region);
39 
40 public:
42 
49  constructor(softint seconds_east);
50 
51 public:
53 
58  copy();
59 
60 public:
62 
73 date date(softint secs, softint us = 0);
74 
75 public:
77 
87 date date(date d);
88 
89 public:
91 
103 date date(string dtstr);
104 
105 public:
107 
127 date date(string dtstr, string mask);
128 
129 public:
131 
143 date dateMs(softint ms);
144 
145 public:
147 
159 date dateUs(softint us);
160 
161 public:
163 
175 bool hasDST();
176 
177 public:
179 
189 string region();
190 
191 public:
193 
203 static TimeZone get();
204 
205 public:
207 
218 static nothing set(TimeZone zone);
219 
220 public:
222 
234 static nothing setRegion(string region);
235 
236 public:
238 
248 static nothing setUTCOffset(softint seconds_east);
249 };
250 };
constructor(string region)
Creates the TimeZone object based on the region name (ex: "America/Chicago")
static nothing setUTCOffset(softint seconds_east)
Sets the time zone for the current Program object from an integer offset in seconds east of UTC...
date dateUs(softint us)
Returns a date in the object's zone based on an offsets in microseconds from 1970-01-01Z.
static nothing setRegion(string region)
Sets the time zone for the current Program object from a time zone region name.
The TimeZone class provides access to time zone functionality.
Definition: QC_TimeZone.dox.h:6
date date(softint secs, softint us=0)
Returns the equivalent date in the time zone of the current object.
int UTCOffset()
Returns the number of seconds east of UTC for the zone; negative numbers indicate a zone west of UTC...
date dateMs(softint ms)
Returns a date in the object's zone based on an offsets in milliseconds from 1970-01-01Z.
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
copy()
Creates a copy of the TimeZone object.
string region()
Returns the region name as a string; if the current zone is based on a UTC offset, then the UTC offset is returned as a string like "+01:00".
bool hasDST()
Returns True if the zone has daylight saving's time rules, False if not.