~ubuntu-branches/ubuntu/precise/libzeitgeist/precise-proposed

« back to all changes in this revision

Viewing changes to .pc/debian-changes-0.3.8-0ubuntu1/doc/reference/html/zeitgeist-1.0-Timestamp-handling.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-03-23 17:05:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20110323170543-qks4dcl41i222izh
Tags: 0.3.8-0ubuntu1
* New upstream release
  - ZeitgeistLog missing implementation of get_property for "connected"
    (LP: #734080)
  - libzeitgeist vapi needs an update (LP: #739653)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
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">
 
13
</head>
 
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">
 
16
<tr valign="middle">
 
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>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#zeitgeist-1.0-Timestamp-handling.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#zeitgeist-1.0-Timestamp-handling.description" class="shortcut">Description</a>
 
27
</td></tr>
 
28
</table>
 
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>
 
32
<td valign="top">
 
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>
 
35
</td>
 
36
<td valign="top" align="right"></td>
 
37
</tr></table></div>
 
38
<div class="refsynopsisdiv">
 
39
<a name="zeitgeist-1.0-Timestamp-handling.synopsis"></a><h2>Synopsis</h2>
 
40
<pre class="synopsis">
 
41
#include &lt;zeitgeist.h&gt;
 
42
 
 
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>);
 
63
</pre>
 
64
</div>
 
65
<div class="refsect1">
 
66
<a name="zeitgeist-1.0-Timestamp-handling.description"></a><h2>Description</h2>
 
67
<p>
 
68
A suite of convenience functions for dealing with timestamps and dates.
 
69
</p>
 
70
<p>
 
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.
 
73
</p>
 
74
</div>
 
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)
 
80
</pre>
 
81
<p>
 
82
A second represented as a Zeitgeist timestamp (ie. 1000ms)
 
83
</p>
 
84
</div>
 
85
<hr>
 
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)
 
89
</pre>
 
90
<p>
 
91
A minute represented as a Zeitgeist timestamp (ie. 60000ms)
 
92
</p>
 
93
</div>
 
94
<hr>
 
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)
 
98
</pre>
 
99
<p>
 
100
An hour represented as a Zeitgeist timestamp (ie. 3600000ms)
 
101
</p>
 
102
</div>
 
103
<hr>
 
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)
 
107
</pre>
 
108
<p>
 
109
A day represented as a Zeitgeist timestamp (ie. 86400000ms)
 
110
</p>
 
111
</div>
 
112
<hr>
 
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)
 
116
</pre>
 
117
<p>
 
118
A week represented as a Zeitgeist timestamp (ie. 604800000ms)
 
119
</p>
 
120
</div>
 
121
<hr>
 
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)
 
125
</pre>
 
126
<p>
 
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.
 
130
</p>
 
131
</div>
 
132
<hr>
 
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>
 
136
<p>
 
137
Get the timestamp for the current system time
 
138
</p>
 
139
<div class="variablelist"><table border="0">
 
140
<col align="left" valign="top">
 
141
<tbody><tr>
 
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>
 
145
</tr></tbody>
 
146
</table></div>
 
147
</div>
 
148
<hr>
 
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">
 
154
<tbody>
 
155
<tr>
 
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>
 
158
</tr>
 
159
<tr>
 
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>
 
162
</tr>
 
163
</tbody>
 
164
</table></div>
 
165
</div>
 
166
<hr>
 
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>
 
171
<p>
 
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
 
175
be 0.
 
176
</p>
 
177
<div class="variablelist"><table border="0">
 
178
<col align="left" valign="top">
 
179
<tbody>
 
180
<tr>
 
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>
 
183
</tr>
 
184
<tr>
 
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>
 
187
</tr>
 
188
</tbody>
 
189
</table></div>
 
190
</div>
 
191
<hr>
 
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>
 
195
<p>
 
196
Parse a timestamp from a ISO8601 encoded string.
 
197
</p>
 
198
<div class="variablelist"><table border="0">
 
199
<col align="left" valign="top">
 
200
<tbody>
 
201
<tr>
 
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>
 
204
</tr>
 
205
<tr>
 
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>
 
209
</td>
 
210
</tr>
 
211
</tbody>
 
212
</table></div>
 
213
</div>
 
214
<hr>
 
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>
 
218
<p>
 
219
Convert a timestamp to a human readable ISO8601 format
 
220
</p>
 
221
<div class="variablelist"><table border="0">
 
222
<col align="left" valign="top">
 
223
<tbody>
 
224
<tr>
 
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>
 
227
</tr>
 
228
<tr>
 
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>
 
232
</tr>
 
233
</tbody>
 
234
</table></div>
 
235
</div>
 
236
<hr>
 
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>
 
240
<p>
 
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.
 
242
</p>
 
243
<div class="variablelist"><table border="0">
 
244
<col align="left" valign="top">
 
245
<tbody>
 
246
<tr>
 
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>
 
249
</tr>
 
250
<tr>
 
251
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
252
<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>
 
255
</tr>
 
256
</tbody>
 
257
</table></div>
 
258
</div>
 
259
<hr>
 
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>
 
265
<p>
 
266
Convert a day, month, year tuple into a Zeitgeist timestamp
 
267
</p>
 
268
<div class="variablelist"><table border="0">
 
269
<col align="left" valign="top">
 
270
<tbody>
 
271
<tr>
 
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>
 
274
</td>
 
275
</tr>
 
276
<tr>
 
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>
 
279
</td>
 
280
</tr>
 
281
<tr>
 
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>
 
284
</td>
 
285
</tr>
 
286
<tr>
 
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>
 
292
</tr>
 
293
</tbody>
 
294
</table></div>
 
295
</div>
 
296
<hr>
 
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>
 
301
<p>
 
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
 
303
</p>
 
304
<div class="variablelist"><table border="0">
 
305
<col align="left" valign="top">
 
306
<tbody>
 
307
<tr>
 
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>
 
310
</td>
 
311
</tr>
 
312
<tr>
 
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>
 
315
</td>
 
316
</tr>
 
317
</tbody>
 
318
</table></div>
 
319
</div>
 
320
<hr>
 
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>
 
324
<p>
 
325
Calculate the timestamp for the next midnight after <em class="parameter"><code>timestamp</code></em>
 
326
</p>
 
327
<div class="variablelist"><table border="0">
 
328
<col align="left" valign="top">
 
329
<tbody>
 
330
<tr>
 
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>
 
333
</tr>
 
334
<tr>
 
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>
 
341
</tr>
 
342
</tbody>
 
343
</table></div>
 
344
</div>
 
345
<hr>
 
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>
 
349
<p>
 
350
Calculate the timestamp for the midnight just before <em class="parameter"><code>timestamp</code></em>
 
351
</p>
 
352
<div class="variablelist"><table border="0">
 
353
<col align="left" valign="top">
 
354
<tbody>
 
355
<tr>
 
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>
 
358
</tr>
 
359
<tr>
 
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>
 
366
</tr>
 
367
</tbody>
 
368
</table></div>
 
369
</div>
 
370
</div>
 
371
</div>
 
372
<div class="footer">
 
373
<hr>
 
374
          Generated by GTK-Doc V1.16</div>
 
375
</body>
 
376
</html>
 
 
b'\\ No newline at end of file'