1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>glibmm: Glib::TimeZone Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">glibmm
 <span id="projectnumber">2.42.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceGlib.html">Glib</a></li><li class="navelem"><a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="#related">Related Functions</a> |
<a href="classGlib_1_1TimeZone-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Glib::TimeZone Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classGlib_1_1TimeZone.html" title="TimeZone - A structure representing a time zone. ">TimeZone</a> - A structure representing a time zone.
<a href="classGlib_1_1TimeZone.html#details">More...</a></p>
<p><code>#include <glibmm/timezone.h></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af9c8a7635fc43243d13799b7cf9544fc"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#af9c8a7635fc43243d13799b7cf9544fc">TimeZone</a> ()</td></tr>
<tr class="memdesc:af9c8a7635fc43243d13799b7cf9544fc"><td class="mdescLeft"> </td><td class="mdescRight">Constructs an invalid object. <a href="#af9c8a7635fc43243d13799b7cf9544fc">More...</a><br /></td></tr>
<tr class="separator:af9c8a7635fc43243d13799b7cf9544fc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a37e807fdfc03d2bcd650d03b8c100268"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a37e807fdfc03d2bcd650d03b8c100268">TimeZone</a> (GTimeZone* castitem, bool make_a_copy=false)</td></tr>
<tr class="separator:a37e807fdfc03d2bcd650d03b8c100268"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a97a5c31d3146547deb2307cf1d38a734"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a97a5c31d3146547deb2307cf1d38a734">TimeZone</a> (const <a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a>& src)</td></tr>
<tr class="separator:a97a5c31d3146547deb2307cf1d38a734"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a66afaef68db0a541e2ea1ac3978f56bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a>& </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a66afaef68db0a541e2ea1ac3978f56bc">operator=</a> (const <a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a>& src)</td></tr>
<tr class="separator:a66afaef68db0a541e2ea1ac3978f56bc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7999de2ccd969a521d580f228925e3ec"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a7999de2ccd969a521d580f228925e3ec">~TimeZone</a> ()</td></tr>
<tr class="separator:a7999de2ccd969a521d580f228925e3ec"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5018eca73f72727ef17c5187d83f749e"><td class="memItemLeft" align="right" valign="top">GTimeZone* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a5018eca73f72727ef17c5187d83f749e">gobj</a> ()</td></tr>
<tr class="separator:a5018eca73f72727ef17c5187d83f749e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afc6556600c7fd49b5ef596c0974a161c"><td class="memItemLeft" align="right" valign="top">const GTimeZone* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#afc6556600c7fd49b5ef596c0974a161c">gobj</a> () const </td></tr>
<tr class="separator:afc6556600c7fd49b5ef596c0974a161c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a210b9c3c3478f2292b1d26b3d3171211"><td class="memItemLeft" align="right" valign="top">GTimeZone* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a210b9c3c3478f2292b1d26b3d3171211">gobj_copy</a> () const </td></tr>
<tr class="memdesc:a210b9c3c3478f2292b1d26b3d3171211"><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. <a href="#a210b9c3c3478f2292b1d26b3d3171211">More...</a><br /></td></tr>
<tr class="separator:a210b9c3c3478f2292b1d26b3d3171211"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0f3242fb2512db7eaaa495a7c59da068"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a0f3242fb2512db7eaaa495a7c59da068">find_interval</a> (<a class="el" href="group__glibmmEnums.html#ga56a2fdf6fb8599b99302868a176aac43">TimeType</a> type, gint64 time) const </td></tr>
<tr class="memdesc:a0f3242fb2512db7eaaa495a7c59da068"><td class="mdescLeft"> </td><td class="mdescRight">Finds an the interval within <em>tz</em> that corresponds to the given <em>time</em>. <a href="#a0f3242fb2512db7eaaa495a7c59da068">More...</a><br /></td></tr>
<tr class="separator:a0f3242fb2512db7eaaa495a7c59da068"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aecf5f84a35a598bce6a9a8ad0a61b323"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#aecf5f84a35a598bce6a9a8ad0a61b323">adjust_time</a> (<a class="el" href="group__glibmmEnums.html#ga56a2fdf6fb8599b99302868a176aac43">TimeType</a> type, gint64& time) const </td></tr>
<tr class="memdesc:aecf5f84a35a598bce6a9a8ad0a61b323"><td class="mdescLeft"> </td><td class="mdescRight">Finds an interval within <em>tz</em> that corresponds to the given <em>time</em>, possibly adjusting <em>time</em> if required to fit into an interval. <a href="#aecf5f84a35a598bce6a9a8ad0a61b323">More...</a><br /></td></tr>
<tr class="separator:aecf5f84a35a598bce6a9a8ad0a61b323"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac412636765e4cf0b2caff196831c0f3c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#ac412636765e4cf0b2caff196831c0f3c">get_abbreviation</a> (int interval) const </td></tr>
<tr class="memdesc:ac412636765e4cf0b2caff196831c0f3c"><td class="mdescLeft"> </td><td class="mdescRight">Determines the time zone abbreviation to be used during a particular <em>interval</em> of time in the time zone <em>tz</em>. <a href="#ac412636765e4cf0b2caff196831c0f3c">More...</a><br /></td></tr>
<tr class="separator:ac412636765e4cf0b2caff196831c0f3c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2745bd79ce4597e1894d248ceacfb485"><td class="memItemLeft" align="right" valign="top">gint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a2745bd79ce4597e1894d248ceacfb485">get_offset</a> (int interval) const </td></tr>
<tr class="memdesc:a2745bd79ce4597e1894d248ceacfb485"><td class="mdescLeft"> </td><td class="mdescRight">Determines the offset to UTC in effect during a particular <em>interval</em> of time in the time zone <em>tz</em>. <a href="#a2745bd79ce4597e1894d248ceacfb485">More...</a><br /></td></tr>
<tr class="separator:a2745bd79ce4597e1894d248ceacfb485"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7b6ce83c671b197d12caf8a87cabe280"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a7b6ce83c671b197d12caf8a87cabe280">is_dst</a> (int interval) const </td></tr>
<tr class="memdesc:a7b6ce83c671b197d12caf8a87cabe280"><td class="mdescLeft"> </td><td class="mdescRight">Determines if daylight savings time is in effect during a particular <em>interval</em> of time in the time zone <em>tz</em>. <a href="#a7b6ce83c671b197d12caf8a87cabe280">More...</a><br /></td></tr>
<tr class="separator:a7b6ce83c671b197d12caf8a87cabe280"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ad53f95cbf8307a835575a33becff076e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#ad53f95cbf8307a835575a33becff076e">create</a> (const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>& identifier)</td></tr>
<tr class="memdesc:ad53f95cbf8307a835575a33becff076e"><td class="mdescLeft"> </td><td class="mdescRight">Creates a <a class="el" href="classGlib_1_1TimeZone.html" title="TimeZone - A structure representing a time zone. ">TimeZone</a> corresponding to <em>identifier</em>. <a href="#ad53f95cbf8307a835575a33becff076e">More...</a><br /></td></tr>
<tr class="separator:ad53f95cbf8307a835575a33becff076e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae0eeec8e8ec473789702acac8e8ed37d"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#ae0eeec8e8ec473789702acac8e8ed37d">create_local</a> ()</td></tr>
<tr class="memdesc:ae0eeec8e8ec473789702acac8e8ed37d"><td class="mdescLeft"> </td><td class="mdescRight">Creates a <a class="el" href="classGlib_1_1TimeZone.html" title="TimeZone - A structure representing a time zone. ">TimeZone</a> corresponding to local time. <a href="#ae0eeec8e8ec473789702acac8e8ed37d">More...</a><br /></td></tr>
<tr class="separator:ae0eeec8e8ec473789702acac8e8ed37d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3321991cbc511c9c1365d1e26de6fc87"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a3321991cbc511c9c1365d1e26de6fc87">create_utc</a> ()</td></tr>
<tr class="memdesc:a3321991cbc511c9c1365d1e26de6fc87"><td class="mdescLeft"> </td><td class="mdescRight">Creates a <a class="el" href="classGlib_1_1TimeZone.html" title="TimeZone - A structure representing a time zone. ">TimeZone</a> corresponding to UTC. <a href="#a3321991cbc511c9c1365d1e26de6fc87">More...</a><br /></td></tr>
<tr class="separator:a3321991cbc511c9c1365d1e26de6fc87"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a717ab5d4a1cc6c77665dd4e78b517ba4"><td class="memItemLeft" align="right" valign="top">GTimeZone* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a717ab5d4a1cc6c77665dd4e78b517ba4">gobject_</a></td></tr>
<tr class="separator:a717ab5d4a1cc6c77665dd4e78b517ba4"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a>
Related Functions</h2></td></tr>
<tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p>
</td></tr>
<tr class="memitem:a2d4464f05ba65fd63df60e9bcae8d97e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1TimeZone.html">Glib::TimeZone</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1TimeZone.html#a2d4464f05ba65fd63df60e9bcae8d97e">wrap</a> (GTimeZone* object, bool take_copy=false)</td></tr>
<tr class="memdesc:a2d4464f05ba65fd63df60e9bcae8d97e"><td class="mdescLeft"> </td><td class="mdescRight">A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#a2d4464f05ba65fd63df60e9bcae8d97e">More...</a><br /></td></tr>
<tr class="separator:a2d4464f05ba65fd63df60e9bcae8d97e"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classGlib_1_1TimeZone.html" title="TimeZone - A structure representing a time zone. ">TimeZone</a> - A structure representing a time zone. </p>
<p><a class="el" href="classGlib_1_1TimeZone.html" title="TimeZone - A structure representing a time zone. ">TimeZone</a> is a structure that represents a time zone, at no particular point in time. It is refcounted and immutable.</p>
<p>A time zone contains a number of intervals. Each interval has an abbreviation to describe it, an offet to UTC and a flag indicating if the daylight savings time is in effect during that interval. A time zone always has at least one interval – interval 0.</p>
<p>Every UTC time is contained within exactly one interval, but a given local time may be contained within zero, one or two intervals (due to incontinuities associated with daylight savings time).</p>
<p>An interval may refer to a specific period of time (eg: the duration of daylight savings time during 2010) or it may refer to many periods of time that share the same properties (eg: all periods of daylight savings time). It is also possible (usually for political reasons) that some properties (like the abbreviation) change between intervals without other properties changing. </p><dl class="since_2_30"><dt><b><a class="el" href="since_2_30.html#_since_2_30000002">Since glibmm 2.30:</a></b></dt><dd></dd></dl>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="af9c8a7635fc43243d13799b7cf9544fc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Glib::TimeZone::TimeZone </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs an invalid object. </p>
<p>E.g. for output arguments to methods. There is not much you can do with the object before it has been assigned a valid value. </p>
</div>
</div>
<a class="anchor" id="a37e807fdfc03d2bcd650d03b8c100268"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">Glib::TimeZone::TimeZone </td>
<td>(</td>
<td class="paramtype">GTimeZone * </td>
<td class="paramname"><em>castitem</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>make_a_copy</em> = <code>false</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a97a5c31d3146547deb2307cf1d38a734"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Glib::TimeZone::TimeZone </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a>& </td>
<td class="paramname"><em>src</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a7999de2ccd969a521d580f228925e3ec"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Glib::TimeZone::~TimeZone </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aecf5f84a35a598bce6a9a8ad0a61b323"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Glib::TimeZone::adjust_time </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__glibmmEnums.html#ga56a2fdf6fb8599b99302868a176aac43">TimeType</a> </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">gint64 & </td>
<td class="paramname"><em>time</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Finds an interval within <em>tz</em> that corresponds to the given <em>time</em>, possibly adjusting <em>time</em> if required to fit into an interval. </p>
<p>The meaning of <em>time</em> depends on <em>type</em>.</p>
<p>This function is similar to g_time_zone_find_interval(), with the difference that it always succeeds (by making the adjustments described below).</p>
<p>In any of the cases where g_time_zone_find_interval() succeeds then this function returns the same value, without modifying <em>time</em>.</p>
<p>This function may, however, modify <em>time</em> in order to deal with non-existent times. If the non-existent local <em>time</em> of 02:30 were requested on March 14th 2010 in Toronto then this function would adjust <em>time</em> to be 03:00 and return the interval containing the adjusted time.</p>
<dl class="since_2_26"><dt><b><a class="el" href="since_2_26.html#_since_2_26000056">Since glibmm 2.26:</a></b></dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>The TimeType of <em>time</em>. </td></tr>
<tr><td class="paramname">time</td><td>A pointer to a number of seconds since January 1, 1970. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The interval containing <em>time</em>, never -1. </dd></dl>
</div>
</div>
<a class="anchor" id="ad53f95cbf8307a835575a33becff076e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a> Glib::TimeZone::create </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>& </td>
<td class="paramname"><em>identifier</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a <a class="el" href="classGlib_1_1TimeZone.html" title="TimeZone - A structure representing a time zone. ">TimeZone</a> corresponding to <em>identifier</em>. </p>
<p><em>identifier</em> can either be an RFC3339/ISO 8601 time offset or something that would pass as a valid value for the <code>TZ</code> environment variable (including <code>0</code>).</p>
<p>In Windows, <em>identifier</em> can also be the unlocalized name of a time zone for standard time, for example "Pacific Standard Time".</p>
<p>Valid RFC3339 time offsets are <code>"Z"</code> (for UTC) or <code>"±hh:mm"</code>. ISO 8601 additionally specifies <code>"±hhmm"</code> and <code>"±hh"</code>. Offsets are time values to be added to Coordinated Universal Time (UTC) to get the local time.</p>
<p>In UNIX, the <code>TZ</code> environment variable typically corresponds to the name of a file in the zoneinfo database, or string in "std offset [dst [offset],start[/time],end[/time]]" (POSIX) format. There are no spaces in the specification. The name of standard and daylight savings time zone must be three or more alphabetic characters. Offsets are time values to be added to local time to get Coordinated Universal Time (UTC) and should be <code>"[±]hh[[:]mm[:ss]]"</code>. Dates are either <code>"Jn"</code> (Julian day with n between 1 and 365, leap years not counted), <code>"n"</code> (zero-based Julian day with n between 0 and 365) or <code>"Mm.w.d"</code> (day d (0 <= d <= 6) of week w (1 <= w <= 5) of month m (1 <= m <= 12), day 0 is a Sunday). Times are in local wall clock time, the default is 02:00:00.</p>
<p>In Windows, the "tzn[+|–]hh[:mm[:ss]][dzn]" format is used, but also accepts POSIX format. The Windows format uses US rules for all time zones; daylight savings time is 60 minutes behind the standard time with date and time of change taken from Pacific Standard Time. Offsets are time values to be added to the local time to get Coordinated Universal Time (UTC).</p>
<p>g_time_zone_new_local() calls this function with the value of the <code>TZ</code> environment variable. This function itself is independent of the value of <code>TZ</code>, but if <em>identifier</em> is <code>0</code> then <code>/etc/localtime</code> will be consulted to discover the correct time zone on UNIX and the registry will be consulted or GetTimeZoneInformation() will be used to get the local time zone on Windows.</p>
<p>If intervals are not available, only time zone rules from <code>TZ</code> environment variable or other means, then they will be computed from year 1900 to 2037. If the maximum year for the rules is available and it is greater than 2037, then it will followed instead.</p>
<p>See <a href="http://tools.ietf.org/html/rfc3339#section-5.6">RFC3339 §5.6</a> for a precise definition of valid RFC3339 time offsets (the <code>time-offset</code> expansion) and ISO 8601 for the full list of valid time offsets. See <a href="http://www.gnu.org/s/libc/manual/html_node/TZ-Variable.html">The GNU C Library manual</a> for an explanation of the possible values of the <code>TZ</code> environment variable. See <a href="http://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx">Microsoft Time Zone Index Values</a> for the list of time zones on Windows.</p>
<p>You should release the return value by calling g_time_zone_unref() when you are done with it.</p>
<dl class="since_2_26"><dt><b><a class="el" href="since_2_26.html#_since_2_26000052">Since glibmm 2.26:</a></b></dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">identifier</td><td>A timezone identifier. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The requested timezone. </dd></dl>
</div>
</div>
<a class="anchor" id="ae0eeec8e8ec473789702acac8e8ed37d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a> Glib::TimeZone::create_local </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a <a class="el" href="classGlib_1_1TimeZone.html" title="TimeZone - A structure representing a time zone. ">TimeZone</a> corresponding to local time. </p>
<p>The local time zone may change between invocations to this function; for example, if the system administrator changes it.</p>
<p>This is equivalent to calling g_time_zone_new() with the value of the <code>TZ</code> environment variable (including the possibility of <code>0</code>).</p>
<p>You should release the return value by calling g_time_zone_unref() when you are done with it.</p>
<dl class="since_2_26"><dt><b><a class="el" href="since_2_26.html#_since_2_26000053">Since glibmm 2.26:</a></b></dt><dd></dd></dl>
<dl class="section return"><dt>Returns</dt><dd>The local timezone. </dd></dl>
</div>
</div>
<a class="anchor" id="a3321991cbc511c9c1365d1e26de6fc87"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a> Glib::TimeZone::create_utc </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a <a class="el" href="classGlib_1_1TimeZone.html" title="TimeZone - A structure representing a time zone. ">TimeZone</a> corresponding to UTC. </p>
<p>This is equivalent to calling g_time_zone_new() with a value like "Z", "UTC", "+00", etc.</p>
<p>You should release the return value by calling g_time_zone_unref() when you are done with it.</p>
<dl class="since_2_26"><dt><b><a class="el" href="since_2_26.html#_since_2_26000054">Since glibmm 2.26:</a></b></dt><dd></dd></dl>
<dl class="section return"><dt>Returns</dt><dd>The universal timezone. </dd></dl>
</div>
</div>
<a class="anchor" id="a0f3242fb2512db7eaaa495a7c59da068"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Glib::TimeZone::find_interval </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__glibmmEnums.html#ga56a2fdf6fb8599b99302868a176aac43">TimeType</a> </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">gint64 </td>
<td class="paramname"><em>time</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Finds an the interval within <em>tz</em> that corresponds to the given <em>time</em>. </p>
<p>The meaning of <em>time</em> depends on <em>type</em>.</p>
<p>If <em>type</em> is TIME_TYPE_UNIVERSAL then this function will always succeed (since universal time is monotonic and continuous).</p>
<p>Otherwise <em>time</em> is treated as local time. The distinction between TIME_TYPE_STANDARD and TIME_TYPE_DAYLIGHT is ignored except in the case that the given <em>time</em> is ambiguous. In Toronto, for example, 01:30 on November 7th 2010 occurred twice (once inside of daylight savings time and the next, an hour later, outside of daylight savings time). In this case, the different value of <em>type</em> would result in a different interval being returned.</p>
<p>It is still possible for this function to fail. In Toronto, for example, 02:00 on March 14th 2010 does not exist (due to the leap forward to begin daylight savings time). -1 is returned in that case.</p>
<dl class="since_2_26"><dt><b><a class="el" href="since_2_26.html#_since_2_26000055">Since glibmm 2.26:</a></b></dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>The TimeType of <em>time</em>. </td></tr>
<tr><td class="paramname">time</td><td>A number of seconds since January 1, 1970. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The interval containing <em>time</em>, or -1 in case of failure. </dd></dl>
</div>
</div>
<a class="anchor" id="ac412636765e4cf0b2caff196831c0f3c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Glib::TimeZone::get_abbreviation </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>interval</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines the time zone abbreviation to be used during a particular <em>interval</em> of time in the time zone <em>tz</em>. </p>
<p>For example, in Toronto this is currently "EST" during the winter months and "EDT" during the summer months when daylight savings time is in effect.</p>
<dl class="since_2_26"><dt><b><a class="el" href="since_2_26.html#_since_2_26000057">Since glibmm 2.26:</a></b></dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">interval</td><td>An interval within the timezone. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The time zone abbreviation, which belongs to <em>tz</em>. </dd></dl>
</div>
</div>
<a class="anchor" id="a2745bd79ce4597e1894d248ceacfb485"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">gint32 Glib::TimeZone::get_offset </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>interval</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines the offset to UTC in effect during a particular <em>interval</em> of time in the time zone <em>tz</em>. </p>
<p>The offset is the number of seconds that you add to UTC time to arrive at local time for <em>tz</em> (ie: negative numbers for time zones west of GMT, positive numbers for east).</p>
<dl class="since_2_26"><dt><b><a class="el" href="since_2_26.html#_since_2_26000058">Since glibmm 2.26:</a></b></dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">interval</td><td>An interval within the timezone. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of seconds that should be added to UTC to get the local time in <em>tz</em>. </dd></dl>
</div>
</div>
<a class="anchor" id="a5018eca73f72727ef17c5187d83f749e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">GTimeZone* Glib::TimeZone::gobj </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="afc6556600c7fd49b5ef596c0974a161c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const GTimeZone* Glib::TimeZone::gobj </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a210b9c3c3478f2292b1d26b3d3171211"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">GTimeZone* Glib::TimeZone::gobj_copy </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. </p>
</div>
</div>
<a class="anchor" id="a7b6ce83c671b197d12caf8a87cabe280"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Glib::TimeZone::is_dst </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>interval</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines if daylight savings time is in effect during a particular <em>interval</em> of time in the time zone <em>tz</em>. </p>
<dl class="since_2_26"><dt><b><a class="el" href="since_2_26.html#_since_2_26000059">Since glibmm 2.26:</a></b></dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">interval</td><td>An interval within the timezone. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if daylight savings time is in effect. </dd></dl>
</div>
</div>
<a class="anchor" id="a66afaef68db0a541e2ea1ac3978f56bc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a>& Glib::TimeZone::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classGlib_1_1TimeZone.html">TimeZone</a>& </td>
<td class="paramname"><em>src</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="a2d4464f05ba65fd63df60e9bcae8d97e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classGlib_1_1TimeZone.html">Glib::TimeZone</a> wrap </td>
<td>(</td>
<td class="paramtype">GTimeZone * </td>
<td class="paramname"><em>object</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>take_copy</em> = <code>false</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">object</td><td>The C instance. </td></tr>
<tr><td class="paramname">take_copy</td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A C++ instance that wraps this C instance. </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a717ab5d4a1cc6c77665dd4e78b517ba4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">GTimeZone* Glib::TimeZone::gobject_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Sep 22 2014 21:38:33 for glibmm by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.7
</small></address>
</body>
</html>
|