1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>Timestamp handling</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
<link rel="home" href="index.html" title="API Documentation for the Zeitgeist Client Library">
8
<link rel="up" href="ch02.html" title="Utility Functions">
9
<link rel="prev" href="zeitgeist-1.0-Mimetype-mapping-and-URI-comprehension.html" title="Mimetype mapping and URI comprehension">
10
<link rel="next" href="zeitgeist-1.0-Symbol-comprehension.html" title="Symbol comprehension">
11
<meta name="generator" content="GTK-Doc V1.16 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="zeitgeist-1.0-Mimetype-mapping-and-URI-comprehension.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">API Documentation for the Zeitgeist Client Library</th>
21
<td><a accesskey="n" href="zeitgeist-1.0-Symbol-comprehension.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#zeitgeist-1.0-Timestamp-handling.synopsis" class="shortcut">Top</a>
26
<a href="#zeitgeist-1.0-Timestamp-handling.description" class="shortcut">Description</a>
29
<div class="refentry">
30
<a name="zeitgeist-1.0-Timestamp-handling"></a><div class="titlepage"></div>
31
<div class="refnamediv"><table width="100%"><tr>
33
<h2><span class="refentrytitle"><a name="zeitgeist-1.0-Timestamp-handling.top_of_page"></a>Timestamp handling</span></h2>
34
<p>Timestamp handling — Convenience functions for dealing with timestamps and dates</p>
36
<td valign="top" align="right"></td>
38
<div class="refsynopsisdiv">
39
<a name="zeitgeist-1.0-Timestamp-handling.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis">
41
#include <zeitgeist.h>
43
#define <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#ZEITGEIST-TIMESTAMP-SECOND:CAPS" title="ZEITGEIST_TIMESTAMP_SECOND">ZEITGEIST_TIMESTAMP_SECOND</a>
44
#define <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#ZEITGEIST-TIMESTAMP-MINUTE:CAPS" title="ZEITGEIST_TIMESTAMP_MINUTE">ZEITGEIST_TIMESTAMP_MINUTE</a>
45
#define <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#ZEITGEIST-TIMESTAMP-HOUR:CAPS" title="ZEITGEIST_TIMESTAMP_HOUR">ZEITGEIST_TIMESTAMP_HOUR</a>
46
#define <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#ZEITGEIST-TIMESTAMP-DAY:CAPS" title="ZEITGEIST_TIMESTAMP_DAY">ZEITGEIST_TIMESTAMP_DAY</a>
47
#define <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#ZEITGEIST-TIMESTAMP-WEEK:CAPS" title="ZEITGEIST_TIMESTAMP_WEEK">ZEITGEIST_TIMESTAMP_WEEK</a>
48
#define <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#ZEITGEIST-TIMESTAMP-YEAR:CAPS" title="ZEITGEIST_TIMESTAMP_YEAR">ZEITGEIST_TIMESTAMP_YEAR</a>
49
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-for-now" title="zeitgeist_timestamp_for_now ()">zeitgeist_timestamp_for_now</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
50
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-from-timeval" title="zeitgeist_timestamp_from_timeval ()">zeitgeist_timestamp_from_timeval</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *tv</code></em>);
51
<span class="returnvalue">void</span> <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-to-timeval" title="zeitgeist_timestamp_to_timeval ()">zeitgeist_timestamp_to_timeval</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timestamp</code></em>,
52
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *tv</code></em>);
53
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-from-iso8601" title="zeitgeist_timestamp_from_iso8601 ()">zeitgeist_timestamp_from_iso8601</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *datetime</code></em>);
54
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-to-iso8601" title="zeitgeist_timestamp_to_iso8601 ()">zeitgeist_timestamp_to_iso8601</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timestamp</code></em>);
55
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-from-date" title="zeitgeist_timestamp_from_date ()">zeitgeist_timestamp_from_date</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> *date</code></em>);
56
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-from-dmy" title="zeitgeist_timestamp_from_dmy ()">zeitgeist_timestamp_from_dmy</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDateDay"><span class="type">GDateDay</span></a> day</code></em>,
57
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDateMonth"><span class="type">GDateMonth</span></a> month</code></em>,
58
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDateYear"><span class="type">GDateYear</span></a> year</code></em>);
59
<span class="returnvalue">void</span> <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-to-date" title="zeitgeist_timestamp_to_date ()">zeitgeist_timestamp_to_date</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timestamp</code></em>,
60
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> *date</code></em>);
61
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-next-midnight" title="zeitgeist_timestamp_next_midnight ()">zeitgeist_timestamp_next_midnight</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timestamp</code></em>);
62
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-prev-midnight" title="zeitgeist_timestamp_prev_midnight ()">zeitgeist_timestamp_prev_midnight</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timestamp</code></em>);
65
<div class="refsect1">
66
<a name="zeitgeist-1.0-Timestamp-handling.description"></a><h2>Description</h2>
68
A suite of convenience functions for dealing with timestamps and dates.
71
Zeitgeist timestamps are represented as <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a>s with the number
72
of milliseconds since the Unix Epoch.
75
<div class="refsect1">
76
<a name="zeitgeist-1.0-Timestamp-handling.details"></a><h2>Details</h2>
77
<div class="refsect2">
78
<a name="ZEITGEIST-TIMESTAMP-SECOND:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_SECOND</h3>
79
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_SECOND G_GINT64_CONSTANT (1000)
82
A second represented as a Zeitgeist timestamp (ie. 1000ms)
86
<div class="refsect2">
87
<a name="ZEITGEIST-TIMESTAMP-MINUTE:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_MINUTE</h3>
88
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_MINUTE G_GINT64_CONSTANT (60000)
91
A minute represented as a Zeitgeist timestamp (ie. 60000ms)
95
<div class="refsect2">
96
<a name="ZEITGEIST-TIMESTAMP-HOUR:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_HOUR</h3>
97
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_HOUR G_GINT64_CONSTANT (3600000)
100
An hour represented as a Zeitgeist timestamp (ie. 3600000ms)
104
<div class="refsect2">
105
<a name="ZEITGEIST-TIMESTAMP-DAY:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_DAY</h3>
106
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_DAY G_GINT64_CONSTANT (86400000)
109
A day represented as a Zeitgeist timestamp (ie. 86400000ms)
113
<div class="refsect2">
114
<a name="ZEITGEIST-TIMESTAMP-WEEK:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_WEEK</h3>
115
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_WEEK G_GINT64_CONSTANT (604800000)
118
A week represented as a Zeitgeist timestamp (ie. 604800000ms)
122
<div class="refsect2">
123
<a name="ZEITGEIST-TIMESTAMP-YEAR:CAPS"></a><h3>ZEITGEIST_TIMESTAMP_YEAR</h3>
124
<pre class="programlisting">#define ZEITGEIST_TIMESTAMP_YEAR G_GINT64_CONSTANT (31556952000)
127
A year represented as a Zeitgeist timestamp (ie. 31556952000ms).
128
Be warned that a year is not 365 days, but in fact 365.2425 days to
129
account for leap years.
133
<div class="refsect2">
134
<a name="zeitgeist-timestamp-for-now"></a><h3>zeitgeist_timestamp_for_now ()</h3>
135
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> zeitgeist_timestamp_for_now (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
137
Get the timestamp for the current system time
139
<div class="variablelist"><table border="0">
140
<col align="left" valign="top">
142
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
143
<td>The timestamp for the current system time. Ie. the number of
144
milliseconds since the Unix Epoch</td>
149
<div class="refsect2">
150
<a name="zeitgeist-timestamp-from-timeval"></a><h3>zeitgeist_timestamp_from_timeval ()</h3>
151
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> zeitgeist_timestamp_from_timeval (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *tv</code></em>);</pre>
152
<div class="variablelist"><table border="0">
153
<col align="left" valign="top">
156
<td><p><span class="term"><em class="parameter"><code>tv</code></em> :</span></p></td>
157
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> instance</td>
160
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
161
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> with the total number of milliseconds since the Unix Epoch</td>
167
<div class="refsect2">
168
<a name="zeitgeist-timestamp-to-timeval"></a><h3>zeitgeist_timestamp_to_timeval ()</h3>
169
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_timestamp_to_timeval (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timestamp</code></em>,
170
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *tv</code></em>);</pre>
172
Write a Zeitgeist timestamp to a <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> instance. Note that Zeitgeist
173
uses only a millisecond resolution for where <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> uses a microsecond
174
resolution, meaning that the lower three digits of <em class="parameter"><code>tv.tv_usec</code></em> will
177
<div class="variablelist"><table border="0">
178
<col align="left" valign="top">
181
<td><p><span class="term"><em class="parameter"><code>timestamp</code></em> :</span></p></td>
182
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> with a number of milliseconds since the Unix Epoch</td>
185
<td><p><span class="term"><em class="parameter"><code>tv</code></em> :</span></p></td>
186
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> instance to store the result in</td>
192
<div class="refsect2">
193
<a name="zeitgeist-timestamp-from-iso8601"></a><h3>zeitgeist_timestamp_from_iso8601 ()</h3>
194
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> zeitgeist_timestamp_from_iso8601 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *datetime</code></em>);</pre>
196
Parse a timestamp from a ISO8601 encoded string.
198
<div class="variablelist"><table border="0">
199
<col align="left" valign="top">
202
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
203
<td>A string containing an iso8601 conforming datetime specification</td>
206
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
207
<td>The timestamp represented by <em class="parameter"><code>datetime</code></em>, or -1 on failure to parse
208
<em class="parameter"><code>datetime</code></em>
215
<div class="refsect2">
216
<a name="zeitgeist-timestamp-to-iso8601"></a><h3>zeitgeist_timestamp_to_iso8601 ()</h3>
217
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * zeitgeist_timestamp_to_iso8601 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timestamp</code></em>);</pre>
219
Convert a timestamp to a human readable ISO8601 format
221
<div class="variablelist"><table border="0">
222
<col align="left" valign="top">
225
<td><p><span class="term"><em class="parameter"><code>timestamp</code></em> :</span></p></td>
226
<td>A Zeitgeist timestamp in ms since the Epoch</td>
229
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
230
<td>A newly allocated string containing the ISO8601 format of
231
<em class="parameter"><code>timestamp</code></em>. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
237
<div class="refsect2">
238
<a name="zeitgeist-timestamp-from-date"></a><h3>zeitgeist_timestamp_from_date ()</h3>
239
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> zeitgeist_timestamp_from_date (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> *date</code></em>);</pre>
241
Convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> to a Zeitgeist timestamp.
243
<div class="variablelist"><table border="0">
244
<col align="left" valign="top">
247
<td><p><span class="term"><em class="parameter"><code>date</code></em> :</span></p></td>
248
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> to convert</td>
251
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
253
<em class="parameter"><code>date</code></em> as a timestamp in milliseconds since the Epoch. The timestamp
254
is guaranteed to be rounded off to the midnight of the given date.</td>
260
<div class="refsect2">
261
<a name="zeitgeist-timestamp-from-dmy"></a><h3>zeitgeist_timestamp_from_dmy ()</h3>
262
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> zeitgeist_timestamp_from_dmy (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDateDay"><span class="type">GDateDay</span></a> day</code></em>,
263
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDateMonth"><span class="type">GDateMonth</span></a> month</code></em>,
264
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDateYear"><span class="type">GDateYear</span></a> year</code></em>);</pre>
266
Convert a day, month, year tuple into a Zeitgeist timestamp
268
<div class="variablelist"><table border="0">
269
<col align="left" valign="top">
272
<td><p><span class="term"><em class="parameter"><code>day</code></em> :</span></p></td>
273
<td>The day of the month represented as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDateDay"><span class="type">GDateDay</span></a>
277
<td><p><span class="term"><em class="parameter"><code>month</code></em> :</span></p></td>
278
<td>The month of the year represented as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDateMonth"><span class="type">GDateMonth</span></a>
282
<td><p><span class="term"><em class="parameter"><code>year</code></em> :</span></p></td>
283
<td>The year represented as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDateYear"><span class="type">GDateYear</span></a>
287
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
288
<td>Input data as a timestamp in milliseconds since the Epoch or
289
-1 in case the provided data does not constitute a valid date.
290
If the date is valid the returned timestamp is guaranteed to be
291
rounded off to the midnight of the given date</td>
297
<div class="refsect2">
298
<a name="zeitgeist-timestamp-to-date"></a><h3>zeitgeist_timestamp_to_date ()</h3>
299
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_timestamp_to_date (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timestamp</code></em>,
300
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> *date</code></em>);</pre>
302
Write a timestamp to a <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a> structure
304
<div class="variablelist"><table border="0">
305
<col align="left" valign="top">
308
<td><p><span class="term"><em class="parameter"><code>timestamp</code></em> :</span></p></td>
309
<td>The Zeitgeist timestamp to convert to a <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDate"><span class="type">GDate</span></a>
313
<td><p><span class="term"><em class="parameter"><code>date</code></em> :</span></p></td>
314
<td>The place to store the result in. Must be non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
321
<div class="refsect2">
322
<a name="zeitgeist-timestamp-next-midnight"></a><h3>zeitgeist_timestamp_next_midnight ()</h3>
323
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> zeitgeist_timestamp_next_midnight (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timestamp</code></em>);</pre>
325
Calculate the timestamp for the next midnight after <em class="parameter"><code>timestamp</code></em>
327
<div class="variablelist"><table border="0">
328
<col align="left" valign="top">
331
<td><p><span class="term"><em class="parameter"><code>timestamp</code></em> :</span></p></td>
332
<td>The Zeitgeist timestamp to find the next midnight for</td>
335
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
336
<td>Returns the timestamp for the first midnight after <em class="parameter"><code>timestamp</code></em>.
337
If <em class="parameter"><code>timestamp</code></em> is already midnight (down to the millisecond) this
338
method will return the value for the next midnight. In other words
339
you can call this method recursively in order to iterate, forwards
340
in time, over midnights.</td>
346
<div class="refsect2">
347
<a name="zeitgeist-timestamp-prev-midnight"></a><h3>zeitgeist_timestamp_prev_midnight ()</h3>
348
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> zeitgeist_timestamp_prev_midnight (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timestamp</code></em>);</pre>
350
Calculate the timestamp for the midnight just before <em class="parameter"><code>timestamp</code></em>
352
<div class="variablelist"><table border="0">
353
<col align="left" valign="top">
356
<td><p><span class="term"><em class="parameter"><code>timestamp</code></em> :</span></p></td>
357
<td>The Zeitgeist timestamp to find the previous midnight for</td>
360
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
361
<td>Returns the timestamp for the first midnight just before <em class="parameter"><code>timestamp</code></em>.
362
If <em class="parameter"><code>timestamp</code></em> is already midnight (down to the millisecond) this
363
method will return the value for the midnight before. In other words
364
you can call this method recursively in order to iterate, backwards
365
in time, over midnights.</td>
374
Generated by GTK-Doc V1.16</div>
b'\\ No newline at end of file'