This file is indexed.

/usr/share/gtk-doc/html/zeitgeist-1.0/zeitgeist-1.0-Timestamp-handling.html is in libzeitgeist-doc 0.3.18-1ubuntu3.

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
<!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 handling: API Documentation for the Zeitgeist Client Library</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="API Documentation for the Zeitgeist Client Library">
<link rel="up" href="ch02.html" title="Utility Functions">
<link rel="prev" href="zeitgeist-1.0-Mimetype-mapping-and-URI-comprehension.html" title="Mimetype mapping and URI comprehension">
<link rel="next" href="zeitgeist-1.0-Symbol-comprehension.html" title="Symbol comprehension">
<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-1.0-Timestamp-handling.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-1.0-Mimetype-mapping-and-URI-comprehension.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="zeitgeist-1.0-Symbol-comprehension.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="zeitgeist-1.0-Timestamp-handling"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="zeitgeist-1.0-Timestamp-handling.top_of_page"></a>Timestamp handling</span></h2>
<p>Timestamp handling — 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-1.0-Timestamp-handling.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" 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-1.0-Timestamp-handling.html#zeitgeist-timestamp-for-now" title="zeitgeist_timestamp_for_now ()">zeitgeist_timestamp_for_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-1.0-Timestamp-handling.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-1.0-Timestamp-handling.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">gint64</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-1.0-Timestamp-handling.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">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-1.0-Timestamp-handling.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">gint64</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-1.0-Timestamp-handling.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-1.0-Timestamp-handling.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="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-1.0-Timestamp-handling.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">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="zeitgeist-1.0-Timestamp-handling.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">void</span>
</td>
<td class="function_name">
<a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-to-timeval" title="zeitgeist_timestamp_to_timeval ()">zeitgeist_timestamp_to_timeval</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="zeitgeist-1.0-Timestamp-handling.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" 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-1.0-Timestamp-handling.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-1.0-Timestamp-handling.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-1.0-Timestamp-handling.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-1.0-Timestamp-handling.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-1.0-Timestamp-handling.html#ZEITGEIST-TIMESTAMP-WEEK:CAPS" title="ZEITGEIST_TIMESTAMP_WEEK">ZEITGEIST_TIMESTAMP_WEEK</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="zeitgeist-1.0-Timestamp-handling.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-1.0-Timestamp-handling.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;zeitgeist.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="zeitgeist-1.0-Timestamp-handling.description"></a><h2>Description</h2>
<p>A suite of convenience functions for dealing with timestamps and dates.</p>
<p>Zeitgeist timestamps are represented as <span class="type">gint64</span>s with the number
of milliseconds since the Unix Epoch.</p>
</div>
<div class="refsect1">
<a name="zeitgeist-1.0-Timestamp-handling.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="zeitgeist-timestamp-for-now"></a><h3>zeitgeist_timestamp_for_now ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>
zeitgeist_timestamp_for_now (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Get the timestamp for the current system time</p>
<div class="refsect3">
<a name="id-1.3.3.7.2.5"></a><h4>Returns</h4>
<p> The timestamp for the current system time. Ie. the number of
milliseconds since the Unix Epoch</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><span class="type">GDate</span> *date</code></em>);</pre>
<p>Convert a <span class="type">GDate</span> to a Zeitgeist timestamp.</p>
<div class="refsect3">
<a name="id-1.3.3.7.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>date</p></td>
<td class="parameter_description"><p>A <span class="type">GDate</span> to convert</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.7.3.6"></a><h4>Returns</h4>
<p> <em class="parameter"><code>date</code></em>
as a timestamp in milliseconds since the Epoch. The timestamp
is guaranteed to be rounded 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><span class="type">GDateDay</span> day</code></em>,
                              <em class="parameter"><code><span class="type">GDateMonth</span> month</code></em>,
                              <em class="parameter"><code><span class="type">GDateYear</span> 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.7.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>day</p></td>
<td class="parameter_description"><p>The day of the month represented as a <span class="type">GDateDay</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>month</p></td>
<td class="parameter_description"><p>The month of the year represented as a <span class="type">GDateMonth</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>year</p></td>
<td class="parameter_description"><p>The year represented as a <span class="type">GDateYear</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.7.4.6"></a><h4>Returns</h4>
<p> Input data as a timestamp in milliseconds since the Epoch or
-1 in case the provided data does not constitute a valid date.
If the date is valid the returned timestamp is guaranteed to be
rounded off to the midnight of the given date</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 <span class="type">gchar</span> *datetime</code></em>);</pre>
<p>Parse a timestamp from a ISO8601 encoded string.</p>
<div class="refsect3">
<a name="id-1.3.3.7.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>datetime</p></td>
<td class="parameter_description"><p>A string containing an iso8601 conforming datetime specification</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.7.5.6"></a><h4>Returns</h4>
<p> The timestamp represented by <em class="parameter"><code>datetime</code></em>
, or -1 on failure to parse
<em class="parameter"><code>datetime</code></em>
</p>
</div>
</div>
<hr>
<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><span class="type">GTimeVal</span> *tv</code></em>);</pre>
<div class="refsect3">
<a name="id-1.3.3.7.6.4"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>tv</p></td>
<td class="parameter_description"><p>A <span class="type">GTimeVal</span> instance</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.7.6.5"></a><h4>Returns</h4>
<p> A <span class="type">gint64</span> with the total number of milliseconds since the Unix Epoch</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 <em class="parameter"><code>timestamp</code></em>
</p>
<div class="refsect3">
<a name="id-1.3.3.7.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>timestamp</p></td>
<td class="parameter_description"><p>The Zeitgeist timestamp to find the next midnight for</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.7.7.6"></a><h4>Returns</h4>
<p> Returns the timestamp for the first midnight after <em class="parameter"><code>timestamp</code></em>
.
If <em class="parameter"><code>timestamp</code></em>
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>
</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 <em class="parameter"><code>timestamp</code></em>
</p>
<div class="refsect3">
<a name="id-1.3.3.7.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>timestamp</p></td>
<td class="parameter_description"><p>The Zeitgeist timestamp to find the previous midnight for</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.7.8.6"></a><h4>Returns</h4>
<p> Returns the timestamp for the first midnight just before <em class="parameter"><code>timestamp</code></em>
.
If <em class="parameter"><code>timestamp</code></em>
is already midnight (down to the millisecond) this
method will return the value for the midnight before. In other words
you can call this method recursively in order to iterate, backwards
in time, over midnights.</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><span class="type">GDate</span> *date</code></em>);</pre>
<p>Write a timestamp to a <span class="type">GDate</span> structure</p>
<div class="refsect3">
<a name="id-1.3.3.7.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>timestamp</p></td>
<td class="parameter_description"><p>The Zeitgeist timestamp to convert to a <span class="type">GDate</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>date</p></td>
<td class="parameter_description"><p>The place to store the result in. Must be non-<code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-timestamp-to-iso8601"></a><h3>zeitgeist_timestamp_to_iso8601 ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
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.7.10.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>timestamp</p></td>
<td class="parameter_description"><p>A Zeitgeist timestamp in ms since the Epoch</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.7.10.6"></a><h4>Returns</h4>
<p> A newly allocated string containing the ISO8601 format of
<em class="parameter"><code>timestamp</code></em>
. Free with <code class="function">g_free()</code>.</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><span class="type">GTimeVal</span> *tv</code></em>);</pre>
<p>Write a Zeitgeist timestamp to a <span class="type">GTimeVal</span> instance. Note that Zeitgeist
uses only a millisecond resolution for where <span class="type">GTimeVal</span> uses a microsecond
resolution, meaning that the lower three digits of <em class="parameter"><code>tv.tv_usec</code></em>
 will
be 0.</p>
<div class="refsect3">
<a name="id-1.3.3.7.11.5"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>timestamp</p></td>
<td class="parameter_description"><p>A <span class="type">gint64</span> with a number of milliseconds since the Unix Epoch</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tv</p></td>
<td class="parameter_description"><p>A <span class="type">GTimeVal</span> instance to store the result in</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="zeitgeist-1.0-Timestamp-handling.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="ZEITGEIST-TIMESTAMP-SECOND:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_SECOND</h3>
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_SECOND G_GINT64_CONSTANT (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 G_GINT64_CONSTANT (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 G_GINT64_CONSTANT (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 G_GINT64_CONSTANT (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 G_GINT64_CONSTANT (604800000)
</pre>
<p>A week represented as a Zeitgeist timestamp (ie. 604800000ms)</p>
</div>
<hr>
<div class="refsect2">
<a name="ZEITGEIST-TIMESTAMP-YEAR:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_YEAR</h3>
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_YEAR G_GINT64_CONSTANT (31556952000)
</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>