Qore Programming Language Reference Manual  0.9.3.1
QC_TimeZone.dox.h
1 namespace Qore {
4 
10 class TimeZone : public Serializable {
11 
12 public:
14 
24 int UTCOffset();
25 
26 public:
28 
42  constructor(string region);
43 
44 public:
46 
53  constructor(softint seconds_east);
54 
55 public:
57 
62  copy();
63 
64 public:
66 
77 date date(softint secs, softint us = 0);
78 
79 public:
81 
91 date date(date d);
92 
93 public:
95 
107 date date(string dtstr);
108 
109 public:
111 
131 date date(string dtstr, string mask);
132 
133 public:
135 
147 date dateMs(softint ms);
148 
149 public:
151 
163 date dateUs(softint us);
164 
165 public:
167 
179 bool hasDST();
180 
181 public:
183 
193 string region();
194 
195 public:
197 
207 static TimeZone get();
208 
209 public:
211 
222 static nothing set(TimeZone zone);
223 
224 public:
226 
238 static nothing setRegion(string region);
239 
240 public:
242 
252 static nothing setUTCOffset(softint seconds_east);
253 };
254 };
constructor()
The constructor does not perform any action; this class is just used to mark a class as serializable ...
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.
The Serializable class can be used to mark a class as being serializable.
Definition: QC_Serializable.dox.h:90
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:10
static nothing set(TimeZone zone)
Sets the time zone for the current Program object from a TimeZone object.
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.
static TimeZone get()
Returns a TimeZone object for the current time zone.
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,...
bool hasDST()
Returns True if the zone has daylight saving time rules, False if not.