/usr/share/gtk-doc/html/zeitgeist-2.0/zeitgeist-2.0-timestamp.html is in libzeitgeist-2.0-doc 0.9.16-0ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>timestamp: Zeitgeist Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Zeitgeist Reference Manual">
<link rel="up" href="ch02.html" title="Utility Functions">
<link rel="prev" href="zeitgeist-2.0-mimetype.html" title="mimetype">
<link rel="next" href="zeitgeist-2.0-ontology.html" title="ontology">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#zeitgeist-2.0-timestamp.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="zeitgeist-2.0-mimetype.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="zeitgeist-2.0-ontology.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="zeitgeist-2.0-timestamp"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="zeitgeist-2.0-timestamp.top_of_page"></a>timestamp</span></h2>
<p>timestamp — Convenience functions for dealing with timestamps and dates</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="zeitgeist-2.0-timestamp.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-2.0-timestamp.html#zeitgeist-timestamp-from-timeval" title="zeitgeist_timestamp_from_timeval ()">zeitgeist_timestamp_from_timeval</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-2.0-timestamp.html#zeitgeist-timestamp-to-timeval" title="zeitgeist_timestamp_to_timeval ()">zeitgeist_timestamp_to_timeval</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-2.0-timestamp.html#zeitgeist-timestamp-from-now" title="zeitgeist_timestamp_from_now ()">zeitgeist_timestamp_from_now</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-2.0-timestamp.html#zeitgeist-timestamp-from-iso8601" title="zeitgeist_timestamp_from_iso8601 ()">zeitgeist_timestamp_from_iso8601</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="zeitgeist-2.0-timestamp.html#zeitgeist-timestamp-to-iso8601" title="zeitgeist_timestamp_to_iso8601 ()">zeitgeist_timestamp_to_iso8601</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-2.0-timestamp.html#zeitgeist-timestamp-from-date" title="zeitgeist_timestamp_from_date ()">zeitgeist_timestamp_from_date</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-2.0-timestamp.html#zeitgeist-timestamp-from-dmy" title="zeitgeist_timestamp_from_dmy ()">zeitgeist_timestamp_from_dmy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-2.0-timestamp.html#zeitgeist-timestamp-to-date" title="zeitgeist_timestamp_to_date ()">zeitgeist_timestamp_to_date</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-2.0-timestamp.html#zeitgeist-timestamp-next-midnight" title="zeitgeist_timestamp_next_midnight ()">zeitgeist_timestamp_next_midnight</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-2.0-timestamp.html#zeitgeist-timestamp-prev-midnight" title="zeitgeist_timestamp_prev_midnight ()">zeitgeist_timestamp_prev_midnight</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="zeitgeist-2.0-timestamp.html#ZEITGEIST-TIMESTAMP-SECOND:CAPS" title="ZEITGEIST_TIMESTAMP_SECOND">ZEITGEIST_TIMESTAMP_SECOND</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="zeitgeist-2.0-timestamp.html#ZEITGEIST-TIMESTAMP-MINUTE:CAPS" title="ZEITGEIST_TIMESTAMP_MINUTE">ZEITGEIST_TIMESTAMP_MINUTE</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="zeitgeist-2.0-timestamp.html#ZEITGEIST-TIMESTAMP-HOUR:CAPS" title="ZEITGEIST_TIMESTAMP_HOUR">ZEITGEIST_TIMESTAMP_HOUR</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="zeitgeist-2.0-timestamp.html#ZEITGEIST-TIMESTAMP-DAY:CAPS" title="ZEITGEIST_TIMESTAMP_DAY">ZEITGEIST_TIMESTAMP_DAY</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="zeitgeist-2.0-timestamp.html#ZEITGEIST-TIMESTAMP-WEEK:CAPS" title="ZEITGEIST_TIMESTAMP_WEEK">ZEITGEIST_TIMESTAMP_WEEK</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="zeitgeist-2.0-timestamp.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="zeitgeist-2.0-timestamp.html#ZEITGEIST-TIMESTAMP-YEAR:CAPS" title="ZEITGEIST_TIMESTAMP_YEAR">ZEITGEIST_TIMESTAMP_YEAR</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="zeitgeist-2.0-timestamp.description"></a><h2>Description</h2>
<p>include: zeitgeist.h</p>
<p>A suite of convenience functions for dealing with timestamps and dates.</p>
<p>Zeitgeist timestamps are represented as <span class="bold"><strong>gint64</strong></span>s with the number of milliseconds since the Unix Epoch.</p>
</div>
<div class="refsect1">
<a name="zeitgeist-2.0-timestamp.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="zeitgeist-timestamp-from-timeval"></a><h3>zeitgeist_timestamp_from_timeval ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>
zeitgeist_timestamp_from_timeval (<em class="parameter"><code><a href="../glib/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *timeval</code></em>);</pre>
<p>Convert a <a href="../glib/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> to an amount of milliseconds since the Unix Epoch</p>
<div class="refsect3">
<a name="id-1.3.3.6.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the (null) instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timeval</p></td>
<td class="parameter_description">
<p> . </p>
<p>time to convert </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.6.2.6"></a><h4>Returns</h4>
<p>number of milliseconds since the Unix Epoch </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-timestamp-to-timeval"></a><h3>zeitgeist_timestamp_to_timeval ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
zeitgeist_timestamp_to_timeval (<em class="parameter"><code><span class="type">gint64</span> timestamp</code></em>,
<em class="parameter"><code><a href="../glib/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *result</code></em>);</pre>
<p>Write a Zeitgeist timestamp to a <a href="../glib/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> instance. Note that Zeitgeist uses only a millisecond resolution, whereas <a href="../glib/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> has microsecond resolution. This means that the lower three digits of <em class="parameter"><code>tv.tv_usec</code></em>
will always be 0.</p>
<div class="refsect3">
<a name="id-1.3.3.6.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the (null) instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timestamp</p></td>
<td class="parameter_description">
<p> . </p>
<p>to convert </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.6.3.6"></a><h4>Returns</h4>
<p>the equivalent <a href="../glib/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> instance. </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-timestamp-from-now"></a><h3>zeitgeist_timestamp_from_now ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>
zeitgeist_timestamp_from_now (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Return the current timestamp in milliseconds.</p>
<div class="refsect3">
<a name="id-1.3.3.6.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the (null) instance</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.6.4.6"></a><h4>Returns</h4>
<p>the timestamp for the current system time, in milliseconds since the Unix Epoch </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-timestamp-from-iso8601"></a><h3>zeitgeist_timestamp_from_iso8601 ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>
zeitgeist_timestamp_from_iso8601 (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *datetime</code></em>);</pre>
<p>Parse a timestamp from an ISO8601-encoded string.</p>
<div class="refsect3">
<a name="id-1.3.3.6.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the (null) instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>datetime</p></td>
<td class="parameter_description">
<p> . </p>
<p>a string containing an ISO8601-conforming datetime </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.6.5.6"></a><h4>Returns</h4>
<p>the timestamp represented by the given string, or -1 if it can't be parsed </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-timestamp-to-iso8601"></a><h3>zeitgeist_timestamp_to_iso8601 ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
zeitgeist_timestamp_to_iso8601 (<em class="parameter"><code><span class="type">gint64</span> timestamp</code></em>);</pre>
<p>Convert a timestamp to a human-readable ISO8601 format</p>
<div class="refsect3">
<a name="id-1.3.3.6.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the (null) instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timestamp</p></td>
<td class="parameter_description">
<p> . </p>
<p>a timestamp in milliseconds since the Unix Epoch </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.6.6.6"></a><h4>Returns</h4>
<p>a newly allocated string containing the ISO8601 version of the given timestamp </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-timestamp-from-date"></a><h3>zeitgeist_timestamp_from_date ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>
zeitgeist_timestamp_from_date (<em class="parameter"><code><a href="../glib/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> *date</code></em>);</pre>
<p>Convert a <span class="bold"><strong>GDate</strong></span> to a Zeitgeist timestamp</p>
<div class="refsect3">
<a name="id-1.3.3.6.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the (null) instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>date</p></td>
<td class="parameter_description">
<p> . </p>
<p>the date to convert </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.6.7.6"></a><h4>Returns</h4>
<p>the given date expressed as a timestamp in milliseconds since the Epoch. The timestamp is guaranteed to be roudned off to the midnight of the given date. </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-timestamp-from-dmy"></a><h3>zeitgeist_timestamp_from_dmy ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>
zeitgeist_timestamp_from_dmy (<em class="parameter"><code><a href="../glib/glib-Date-and-Time-Functions.html#GDateDay"><span class="type">GDateDay</span></a> day</code></em>,
<em class="parameter"><code><a href="../glib/glib-Date-and-Time-Functions.html#GDateMonth"><span class="type">GDateMonth</span></a> month</code></em>,
<em class="parameter"><code><a href="../glib/glib-Date-and-Time-Functions.html#GDateYear"><span class="type">GDateYear</span></a> year</code></em>);</pre>
<p>Convert a day, month, year tuple into a Zeitgeist timestamp</p>
<div class="refsect3">
<a name="id-1.3.3.6.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the (null) instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>day</p></td>
<td class="parameter_description">
<p> . </p>
<p>the day of the month </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>month</p></td>
<td class="parameter_description">
<p> . </p>
<p>the month of the year </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>year</p></td>
<td class="parameter_description">
<p> . </p>
<p>the year </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.6.8.6"></a><h4>Returns</h4>
<p>the given date (rounded off to the midnight), expressed as a timestamp in milliseconds since the Epoch, or -1 in case the provided parameters don't constitute a valid date. </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-timestamp-to-date"></a><h3>zeitgeist_timestamp_to_date ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
zeitgeist_timestamp_to_date (<em class="parameter"><code><span class="type">gint64</span> timestamp</code></em>,
<em class="parameter"><code><a href="../glib/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> *result</code></em>);</pre>
<p>Write a timestamp to a <a href="../glib/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> structure</p>
<div class="refsect3">
<a name="id-1.3.3.6.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the (null) instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timestamp</p></td>
<td class="parameter_description">
<p> . </p>
<p>to convert </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.6.9.6"></a><h4>Returns</h4>
<p><a href="../glib/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> initialized to the given timestamp </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-timestamp-next-midnight"></a><h3>zeitgeist_timestamp_next_midnight ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>
zeitgeist_timestamp_next_midnight (<em class="parameter"><code><span class="type">gint64</span> timestamp</code></em>);</pre>
<p>Calculate the timestamp for the next midnight after the given timestamp.</p>
<p>If is is already midnight (down to the millisecond), this method will return the value for the next midnight. In other words, you can call this method recursively in order to iterate, forwards in time, over midnights.</p>
<div class="refsect3">
<a name="id-1.3.3.6.10.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the (null) instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timestamp</p></td>
<td class="parameter_description">
<p> . </p>
<p>the Zeitgeist timestamp to find the next midnight for </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.6.10.7"></a><h4>Returns</h4>
<p>the timestamp for the next midnight after the given timestamp </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-timestamp-prev-midnight"></a><h3>zeitgeist_timestamp_prev_midnight ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>
zeitgeist_timestamp_prev_midnight (<em class="parameter"><code><span class="type">gint64</span> timestamp</code></em>);</pre>
<p>Calculate the timestamp for the midnight just before the given timestamp.</p>
<p>If is is already midnight (down to the millisecond), this method will return the value for the previous midnight. In other words, you can call this method recursively in order to iterate, backwards in time, over midnights.</p>
<div class="refsect3">
<a name="id-1.3.3.6.11.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the (null) instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timestamp</p></td>
<td class="parameter_description">
<p> . </p>
<p>the Zeitgeist timestamp to find the previous midnight for </p>
<p>. </p>
</td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.6.11.7"></a><h4>Returns</h4>
<p>the timestamp for the midnight just before the given timestamp </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ZEITGEIST-TIMESTAMP-SECOND:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_SECOND</h3>
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_SECOND ((gint64) 1000)
</pre>
<p>A second represented as a Zeitgeist timestamp (ie. 1000ms)</p>
</div>
<hr>
<div class="refsect2">
<a name="ZEITGEIST-TIMESTAMP-MINUTE:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_MINUTE</h3>
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_MINUTE ((gint64) 60000)
</pre>
<p>A minute represented as a Zeitgeist timestamp (ie. 60000ms)</p>
</div>
<hr>
<div class="refsect2">
<a name="ZEITGEIST-TIMESTAMP-HOUR:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_HOUR</h3>
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_HOUR ((gint64) 3600000)
</pre>
<p>An hour represented as a Zeitgeist timestamp (ie. 3600000ms)</p>
</div>
<hr>
<div class="refsect2">
<a name="ZEITGEIST-TIMESTAMP-DAY:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_DAY</h3>
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_DAY ((gint64) 86400000)
</pre>
<p>A day represented as a Zeitgeist timestamp (ie. 86400000ms)</p>
</div>
<hr>
<div class="refsect2">
<a name="ZEITGEIST-TIMESTAMP-WEEK:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_WEEK</h3>
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_WEEK ((gint64) 604800000)
</pre>
<p>A week represented as a Zeitgeist timestamp (ie. 604800000ms)</p>
</div>
</div>
<div class="refsect1">
<a name="zeitgeist-2.0-timestamp.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="ZEITGEIST-TIMESTAMP-YEAR:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_YEAR</h3>
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_YEAR 31556952000LL
</pre>
<p>A year represented as a Zeitgeist timestamp (ie. 31556952000ms). Be warned that a year is not 365 days, but in fact 365.2425 days, to account for leap years.</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>
|