1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GDateTime</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
<link rel="prev" href="glib-GTimeZone.html" title="GTimeZone">
<link rel="next" href="glib-Random-Numbers.html" title="Random Numbers">
<meta name="generator" content="GTK-Doc V1.19 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="glib-GTimeZone.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-Random-Numbers.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#glib-GDateTime.synopsis" class="shortcut">Top</a>
|
<a href="#glib-GDateTime.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="glib-GDateTime"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="glib-GDateTime.top_of_page"></a>GDateTime</span></h2>
<p>GDateTime — a structure representing Date and Time</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="glib-GDateTime.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <glib.h>
typedef <a class="link" href="glib-GDateTime.html#GTimeSpan" title="GTimeSpan">GTimeSpan</a>;
#define <a class="link" href="glib-GDateTime.html#G-TIME-SPAN-DAY:CAPS" title="G_TIME_SPAN_DAY">G_TIME_SPAN_DAY</a>
#define <a class="link" href="glib-GDateTime.html#G-TIME-SPAN-HOUR:CAPS" title="G_TIME_SPAN_HOUR">G_TIME_SPAN_HOUR</a>
#define <a class="link" href="glib-GDateTime.html#G-TIME-SPAN-MINUTE:CAPS" title="G_TIME_SPAN_MINUTE">G_TIME_SPAN_MINUTE</a>
#define <a class="link" href="glib-GDateTime.html#G-TIME-SPAN-SECOND:CAPS" title="G_TIME_SPAN_SECOND">G_TIME_SPAN_SECOND</a>
#define <a class="link" href="glib-GDateTime.html#G-TIME-SPAN-MILLISECOND:CAPS" title="G_TIME_SPAN_MILLISECOND">G_TIME_SPAN_MILLISECOND</a>
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime">GDateTime</a>;
<span class="returnvalue">void</span> <a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()">g_date_time_unref</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-ref" title="g_date_time_ref ()">g_date_time_ref</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-new-now" title="g_date_time_new_now ()">g_date_time_new_now</a> (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-new-now-local" title="g_date_time_new_now_local ()">g_date_time_new_now_local</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-new-now-utc" title="g_date_time_new_now_utc ()">g_date_time_new_now_utc</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-new-from-unix-local" title="g_date_time_new_from_unix_local ()">g_date_time_new_from_unix_local</a> (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> t</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-new-from-unix-utc" title="g_date_time_new_from_unix_utc ()">g_date_time_new_from_unix_utc</a> (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> t</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-new-from-timeval-local" title="g_date_time_new_from_timeval_local ()">g_date_time_new_from_timeval_local</a> (<em class="parameter"><code>const <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> *tv</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-new-from-timeval-utc" title="g_date_time_new_from_timeval_utc ()">g_date_time_new_from_timeval_utc</a> (<em class="parameter"><code>const <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> *tv</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-new" title="g_date_time_new ()">g_date_time_new</a> (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> year</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> month</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> day</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> hour</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> minute</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> seconds</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-new-local" title="g_date_time_new_local ()">g_date_time_new_local</a> (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> year</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> month</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> day</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> hour</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> minute</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> seconds</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-new-utc" title="g_date_time_new_utc ()">g_date_time_new_utc</a> (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> year</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> month</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> day</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> hour</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> minute</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> seconds</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-add" title="g_date_time_add ()">g_date_time_add</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GTimeSpan" title="GTimeSpan"><span class="type">GTimeSpan</span></a> timespan</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-add-years" title="g_date_time_add_years ()">g_date_time_add_years</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> years</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-add-months" title="g_date_time_add_months ()">g_date_time_add_months</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> months</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-add-weeks" title="g_date_time_add_weeks ()">g_date_time_add_weeks</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> weeks</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-add-days" title="g_date_time_add_days ()">g_date_time_add_days</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> days</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-add-hours" title="g_date_time_add_hours ()">g_date_time_add_hours</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> hours</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-add-minutes" title="g_date_time_add_minutes ()">g_date_time_add_minutes</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> minutes</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-add-seconds" title="g_date_time_add_seconds ()">g_date_time_add_seconds</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> seconds</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-add-full" title="g_date_time_add_full ()">g_date_time_add_full</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> years</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> months</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> days</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> hours</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> minutes</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> seconds</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-compare" title="g_date_time_compare ()">g_date_time_compare</a> (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> dt1</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> dt2</code></em>);
<a class="link" href="glib-GDateTime.html#GTimeSpan" title="GTimeSpan"><span class="returnvalue">GTimeSpan</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-difference" title="g_date_time_difference ()">g_date_time_difference</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *end</code></em>,
<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *begin</code></em>);
<a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="returnvalue">guint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-hash" title="g_date_time_hash ()">g_date_time_hash</a> (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-equal" title="g_date_time_equal ()">g_date_time_equal</a> (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> dt1</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> dt2</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-GDateTime.html#g-date-time-get-ymd" title="g_date_time_get_ymd ()">g_date_time_get_ymd</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *year</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *month</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *day</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-year" title="g_date_time_get_year ()">g_date_time_get_year</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-month" title="g_date_time_get_month ()">g_date_time_get_month</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-day-of-month" title="g_date_time_get_day_of_month ()">g_date_time_get_day_of_month</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-week-numbering-year" title="g_date_time_get_week_numbering_year ()">g_date_time_get_week_numbering_year</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-week-of-year" title="g_date_time_get_week_of_year ()">g_date_time_get_week_of_year</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-day-of-week" title="g_date_time_get_day_of_week ()">g_date_time_get_day_of_week</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-day-of-year" title="g_date_time_get_day_of_year ()">g_date_time_get_day_of_year</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-hour" title="g_date_time_get_hour ()">g_date_time_get_hour</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-minute" title="g_date_time_get_minute ()">g_date_time_get_minute</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-second" title="g_date_time_get_second ()">g_date_time_get_second</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-microsecond" title="g_date_time_get_microsecond ()">g_date_time_get_microsecond</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-seconds" title="g_date_time_get_seconds ()">g_date_time_get_seconds</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="returnvalue">gint64</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-to-unix" title="g_date_time_to_unix ()">g_date_time_to_unix</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-to-timeval" title="g_date_time_to_timeval ()">g_date_time_to_timeval</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> *tv</code></em>);
<a class="link" href="glib-GDateTime.html#GTimeSpan" title="GTimeSpan"><span class="returnvalue">GTimeSpan</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-get-utc-offset" title="g_date_time_get_utc_offset ()">g_date_time_get_utc_offset</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-get-timezone-abbreviation" title="g_date_time_get_timezone_abbreviation ()">g_date_time_get_timezone_abbreviation</a>
(<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-GDateTime.html#g-date-time-is-daylight-savings" title="g_date_time_is_daylight_savings ()">g_date_time_is_daylight_savings</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-to-timezone" title="g_date_time_to_timezone ()">g_date_time_to_timezone</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-to-local" title="g_date_time_to_local ()">g_date_time_to_local</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-to-utc" title="g_date_time_to_utc ()">g_date_time_to_utc</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-GDateTime.html#g-date-time-format" title="g_date_time_format ()">g_date_time_format</a> (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *format</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="glib-GDateTime.description"></a><h2>Description</h2>
<p>
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> is a structure that combines a Gregorian date and time
into a single structure. It provides many conversion and methods to
manipulate dates and times. Time precision is provided down to
microseconds and the time can range (proleptically) from 0001-01-01
00:00:00 to 9999-12-31 23:59:59.999999. <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> follows POSIX
time in the sense that it is oblivious to leap seconds.
</p>
<p>
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> is an immutable object; once it has been created it cannot
be modified further. All modifiers will create a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>.
Nearly all such functions can fail due to the date or time going out
of range, in which case <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be returned.
</p>
<p>
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> is reference counted: the reference count is increased by calling
<a class="link" href="glib-GDateTime.html#g-date-time-ref" title="g_date_time_ref ()"><code class="function">g_date_time_ref()</code></a> and decreased by calling <a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>. When the
reference count drops to 0, the resources allocated by the <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
structure are released.
</p>
<p>
Many parts of the API may produce non-obvious results. As an
example, adding two months to January 31st will yield March 31st
whereas adding one month and then one month again will yield either
March 28th or March 29th. Also note that adding 24 hours is not
always the same as adding one day (since days containing daylight
savings time transitions are either 23 or 25 hours in length).
</p>
<p>
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> is available since GLib 2.26.
</p>
</div>
<div class="refsect1">
<a name="glib-GDateTime.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GTimeSpan"></a><h3>GTimeSpan</h3>
<pre class="programlisting">typedef gint64 GTimeSpan;
</pre>
<p>
A value representing an interval of time, in microseconds.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="G-TIME-SPAN-DAY:CAPS"></a><h3>G_TIME_SPAN_DAY</h3>
<pre class="programlisting">#define G_TIME_SPAN_DAY (G_GINT64_CONSTANT (86400000000))
</pre>
<p>
Evaluates to a time span of one day.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="G-TIME-SPAN-HOUR:CAPS"></a><h3>G_TIME_SPAN_HOUR</h3>
<pre class="programlisting">#define G_TIME_SPAN_HOUR (G_GINT64_CONSTANT (3600000000))
</pre>
<p>
Evaluates to a time span of one hour.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="G-TIME-SPAN-MINUTE:CAPS"></a><h3>G_TIME_SPAN_MINUTE</h3>
<pre class="programlisting">#define G_TIME_SPAN_MINUTE (G_GINT64_CONSTANT (60000000))
</pre>
<p>
Evaluates to a time span of one minute.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="G-TIME-SPAN-SECOND:CAPS"></a><h3>G_TIME_SPAN_SECOND</h3>
<pre class="programlisting">#define G_TIME_SPAN_SECOND (G_GINT64_CONSTANT (1000000))
</pre>
<p>
Evaluates to a time span of one second.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="G-TIME-SPAN-MILLISECOND:CAPS"></a><h3>G_TIME_SPAN_MILLISECOND</h3>
<pre class="programlisting">#define G_TIME_SPAN_MILLISECOND (G_GINT64_CONSTANT (1000))
</pre>
<p>
Evaluates to a time span of one millisecond.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDateTime"></a><h3>GDateTime</h3>
<pre class="programlisting">typedef struct _GDateTime GDateTime;</pre>
<p>
<span class="structname">GDateTime</span> is an opaque structure whose members
cannot be accessed directly.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-unref"></a><h3>g_date_time_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_date_time_unref (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Atomically decrements the reference count of <em class="parameter"><code>datetime</code></em> by one.
</p>
<p>
When the reference count reaches zero, the resources allocated by
<em class="parameter"><code>datetime</code></em> are freed
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-ref"></a><h3>g_date_time_ref ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_ref (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Atomically increments the reference count of <em class="parameter"><code>datetime</code></em> by one.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> with the reference count increased</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-new-now"></a><h3>g_date_time_new_now ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_new_now (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>);</pre>
<p>
Creates a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to this exact instant in the given
time zone <em class="parameter"><code>tz</code></em>. The time is as accurate as the system allows, to a
maximum accuracy of 1 microsecond.
</p>
<p>
This function will always succeed unless the system clock is set to
truly insane values (or unless GLib is still being used after the
year 9999).
</p>
<p>
You should release the return value by calling <a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>
when you are done with it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tz</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-new-now-local"></a><h3>g_date_time_new_now_local ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_new_now_local (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to this exact instant in the local
time zone.
</p>
<p>
This is equivalent to calling <a class="link" href="glib-GDateTime.html#g-date-time-new-now" title="g_date_time_new_now ()"><code class="function">g_date_time_new_now()</code></a> with the time
zone returned by <a class="link" href="glib-GTimeZone.html#g-time-zone-new-local" title="g_time_zone_new_local ()"><code class="function">g_time_zone_new_local()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-new-now-utc"></a><h3>g_date_time_new_now_utc ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_new_now_utc (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to this exact instant in UTC.
</p>
<p>
This is equivalent to calling <a class="link" href="glib-GDateTime.html#g-date-time-new-now" title="g_date_time_new_now ()"><code class="function">g_date_time_new_now()</code></a> with the time
zone returned by <a class="link" href="glib-GTimeZone.html#g-time-zone-new-utc" title="g_time_zone_new_utc ()"><code class="function">g_time_zone_new_utc()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-new-from-unix-local"></a><h3>g_date_time_new_from_unix_local ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_new_from_unix_local (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> t</code></em>);</pre>
<p>
Creates a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to the given Unix time <em class="parameter"><code>t</code></em> in the
local time zone.
</p>
<p>
Unix time is the number of seconds that have elapsed since 1970-01-01
00:00:00 UTC, regardless of the local time offset.
</p>
<p>
This call can fail (returning <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>) if <em class="parameter"><code>t</code></em> represents a time outside
of the supported range of <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>.
</p>
<p>
You should release the return value by calling <a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>
when you are done with it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>t</code></em> :</span></p></td>
<td>the Unix time</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-new-from-unix-utc"></a><h3>g_date_time_new_from_unix_utc ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_new_from_unix_utc (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> t</code></em>);</pre>
<p>
Creates a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to the given Unix time <em class="parameter"><code>t</code></em> in UTC.
</p>
<p>
Unix time is the number of seconds that have elapsed since 1970-01-01
00:00:00 UTC.
</p>
<p>
This call can fail (returning <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>) if <em class="parameter"><code>t</code></em> represents a time outside
of the supported range of <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>.
</p>
<p>
You should release the return value by calling <a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>
when you are done with it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>t</code></em> :</span></p></td>
<td>the Unix time</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-new-from-timeval-local"></a><h3>g_date_time_new_from_timeval_local ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_new_from_timeval_local (<em class="parameter"><code>const <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> *tv</code></em>);</pre>
<p>
Creates a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to the given <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> <em class="parameter"><code>tv</code></em> in the
local time zone.
</p>
<p>
The time contained in a <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> is always stored in the form of
seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the
local time offset.
</p>
<p>
This call can fail (returning <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>) if <em class="parameter"><code>tv</code></em> represents a time outside
of the supported range of <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>.
</p>
<p>
You should release the return value by calling <a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>
when you are done with it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tv</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-new-from-timeval-utc"></a><h3>g_date_time_new_from_timeval_utc ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_new_from_timeval_utc (<em class="parameter"><code>const <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> *tv</code></em>);</pre>
<p>
Creates a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to the given <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> <em class="parameter"><code>tv</code></em> in UTC.
</p>
<p>
The time contained in a <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> is always stored in the form of
seconds elapsed since 1970-01-01 00:00:00 UTC.
</p>
<p>
This call can fail (returning <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>) if <em class="parameter"><code>tv</code></em> represents a time outside
of the supported range of <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>.
</p>
<p>
You should release the return value by calling <a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>
when you are done with it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tv</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-new"></a><h3>g_date_time_new ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_new (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> year</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> month</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> day</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> hour</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> minute</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> seconds</code></em>);</pre>
<p>
Creates a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to the given date and time in
the time zone <em class="parameter"><code>tz</code></em>.
</p>
<p>
The <em class="parameter"><code>year</code></em> must be between 1 and 9999, <em class="parameter"><code>month</code></em> between 1 and 12 and <em class="parameter"><code>day</code></em>
between 1 and 28, 29, 30 or 31 depending on the month and the year.
</p>
<p>
<em class="parameter"><code>hour</code></em> must be between 0 and 23 and <em class="parameter"><code>minute</code></em> must be between 0 and 59.
</p>
<p>
<em class="parameter"><code>seconds</code></em> must be at least 0.0 and must be strictly less than 60.0.
It will be rounded down to the nearest microsecond.
</p>
<p>
If the given time is not representable in the given time zone (for
example, 02:30 on March 14th 2010 in Toronto, due to daylight savings
time) then the time will be rounded up to the nearest existing time
(in this case, 03:00). If this matters to you then you should verify
the return value for containing the same as the numbers you gave.
</p>
<p>
In the case that the given time is ambiguous in the given time zone
(for example, 01:30 on November 7th 2010 in Toronto, due to daylight
savings time) then the time falling within standard (ie:
non-daylight) time is taken.
</p>
<p>
It not considered a programmer error for the values to this function
to be out of range, but in the case that they are, the function will
return <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
</p>
<p>
You should release the return value by calling <a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>
when you are done with it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tz</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>year</code></em> :</span></p></td>
<td>the year component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>month</code></em> :</span></p></td>
<td>the month component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>day</code></em> :</span></p></td>
<td>the day component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hour</code></em> :</span></p></td>
<td>the hour component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>minute</code></em> :</span></p></td>
<td>the minute component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>seconds</code></em> :</span></p></td>
<td>the number of seconds past the minute</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-new-local"></a><h3>g_date_time_new_local ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_new_local (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> year</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> month</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> day</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> hour</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> minute</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> seconds</code></em>);</pre>
<p>
Creates a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to the given date and time in
the local time zone.
</p>
<p>
This call is equivalent to calling <a class="link" href="glib-GDateTime.html#g-date-time-new" title="g_date_time_new ()"><code class="function">g_date_time_new()</code></a> with the time
zone returned by <a class="link" href="glib-GTimeZone.html#g-time-zone-new-local" title="g_time_zone_new_local ()"><code class="function">g_time_zone_new_local()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>year</code></em> :</span></p></td>
<td>the year component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>month</code></em> :</span></p></td>
<td>the month component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>day</code></em> :</span></p></td>
<td>the day component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hour</code></em> :</span></p></td>
<td>the hour component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>minute</code></em> :</span></p></td>
<td>the minute component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>seconds</code></em> :</span></p></td>
<td>the number of seconds past the minute</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-new-utc"></a><h3>g_date_time_new_utc ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_new_utc (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> year</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> month</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> day</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> hour</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> minute</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> seconds</code></em>);</pre>
<p>
Creates a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to the given date and time in
UTC.
</p>
<p>
This call is equivalent to calling <a class="link" href="glib-GDateTime.html#g-date-time-new" title="g_date_time_new ()"><code class="function">g_date_time_new()</code></a> with the time
zone returned by <a class="link" href="glib-GTimeZone.html#g-time-zone-new-utc" title="g_time_zone_new_utc ()"><code class="function">g_time_zone_new_utc()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>year</code></em> :</span></p></td>
<td>the year component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>month</code></em> :</span></p></td>
<td>the month component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>day</code></em> :</span></p></td>
<td>the day component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hour</code></em> :</span></p></td>
<td>the hour component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>minute</code></em> :</span></p></td>
<td>the minute component of the date</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>seconds</code></em> :</span></p></td>
<td>the number of seconds past the minute</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-add"></a><h3>g_date_time_add ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_add (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GTimeSpan" title="GTimeSpan"><span class="type">GTimeSpan</span></a> timespan</code></em>);</pre>
<p>
Creates a copy of <em class="parameter"><code>datetime</code></em> and adds the specified timespan to the copy.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>timespan</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GTimeSpan" title="GTimeSpan"><span class="type">GTimeSpan</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> which should be freed with
<a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-add-years"></a><h3>g_date_time_add_years ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_add_years (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> years</code></em>);</pre>
<p>
Creates a copy of <em class="parameter"><code>datetime</code></em> and adds the specified number of years to the
copy.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>years</code></em> :</span></p></td>
<td>the number of years</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> which should be freed with
<a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-add-months"></a><h3>g_date_time_add_months ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_add_months (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> months</code></em>);</pre>
<p>
Creates a copy of <em class="parameter"><code>datetime</code></em> and adds the specified number of months to the
copy.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>months</code></em> :</span></p></td>
<td>the number of months</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> which should be freed with
<a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-add-weeks"></a><h3>g_date_time_add_weeks ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_add_weeks (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> weeks</code></em>);</pre>
<p>
Creates a copy of <em class="parameter"><code>datetime</code></em> and adds the specified number of weeks to the
copy.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>weeks</code></em> :</span></p></td>
<td>the number of weeks</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> which should be freed with
<a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-add-days"></a><h3>g_date_time_add_days ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_add_days (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> days</code></em>);</pre>
<p>
Creates a copy of <em class="parameter"><code>datetime</code></em> and adds the specified number of days to the
copy.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>days</code></em> :</span></p></td>
<td>the number of days</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> which should be freed with
<a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-add-hours"></a><h3>g_date_time_add_hours ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_add_hours (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> hours</code></em>);</pre>
<p>
Creates a copy of <em class="parameter"><code>datetime</code></em> and adds the specified number of hours
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hours</code></em> :</span></p></td>
<td>the number of hours to add</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> which should be freed with
<a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-add-minutes"></a><h3>g_date_time_add_minutes ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_add_minutes (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> minutes</code></em>);</pre>
<p>
Creates a copy of <em class="parameter"><code>datetime</code></em> adding the specified number of minutes.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>minutes</code></em> :</span></p></td>
<td>the number of minutes to add</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> which should be freed with
<a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-add-seconds"></a><h3>g_date_time_add_seconds ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_add_seconds (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> seconds</code></em>);</pre>
<p>
Creates a copy of <em class="parameter"><code>datetime</code></em> and adds the specified number of seconds.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>seconds</code></em> :</span></p></td>
<td>the number of seconds to add</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> which should be freed with
<a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-add-full"></a><h3>g_date_time_add_full ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_add_full (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> years</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> months</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> days</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> hours</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> minutes</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> seconds</code></em>);</pre>
<p>
Creates a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> adding the specified values to the current date and
time in <em class="parameter"><code>datetime</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>years</code></em> :</span></p></td>
<td>the number of years to add</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>months</code></em> :</span></p></td>
<td>the number of months to add</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>days</code></em> :</span></p></td>
<td>the number of days to add</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hours</code></em> :</span></p></td>
<td>the number of hours to add</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>minutes</code></em> :</span></p></td>
<td>the number of minutes to add</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>seconds</code></em> :</span></p></td>
<td>the number of seconds to add</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> that should be freed with
<a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-compare"></a><h3>g_date_time_compare ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_compare (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> dt1</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> dt2</code></em>);</pre>
<p>
A comparison function for <a href="glib-GDateTime.html#GDateTime"><span class="type">GDateTimes</span></a> that is suitable
as a <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareFunc" title="GCompareFunc ()"><span class="type">GCompareFunc</span></a>. Both <a href="glib-GDateTime.html#GDateTime"><span class="type">GDateTimes</span></a> must be non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dt1</code></em> :</span></p></td>
<td>first <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> to compare</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dt2</code></em> :</span></p></td>
<td>second <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> to compare</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>-1, 0 or 1 if <em class="parameter"><code>dt1</code></em> is less than, equal to or greater
than <em class="parameter"><code>dt2</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-difference"></a><h3>g_date_time_difference ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GTimeSpan" title="GTimeSpan"><span class="returnvalue">GTimeSpan</span></a> g_date_time_difference (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *end</code></em>,
<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *begin</code></em>);</pre>
<p>
Calculates the difference in time between <em class="parameter"><code>end</code></em> and <em class="parameter"><code>begin</code></em>. The
<a class="link" href="glib-GDateTime.html#GTimeSpan" title="GTimeSpan"><span class="type">GTimeSpan</span></a> that is returned is effectively <em class="parameter"><code>end</code></em> - <em class="parameter"><code>begin</code></em> (ie:
positive if the first parameter is larger).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>begin</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the difference between the two <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, as a time
span expressed in microseconds.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-hash"></a><h3>g_date_time_hash ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="returnvalue">guint</span></a> g_date_time_hash (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> datetime</code></em>);</pre>
<p>
Hashes <em class="parameter"><code>datetime</code></em> into a <a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a>, suitable for use within <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a> containing the hash</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-equal"></a><h3>g_date_time_equal ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_date_time_equal (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> dt1</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> dt2</code></em>);</pre>
<p>
Checks to see if <em class="parameter"><code>dt1</code></em> and <em class="parameter"><code>dt2</code></em> are equal.
</p>
<p>
Equal here means that they represent the same moment after converting
them to the same time zone.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dt1</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dt2</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>dt1</code></em> and <em class="parameter"><code>dt2</code></em> are equal</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-ymd"></a><h3>g_date_time_get_ymd ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_date_time_get_ymd (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *year</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *month</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *day</code></em>);</pre>
<p>
Retrieves the Gregorian day, month, and year of a given <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>year</code></em> :</span></p></td>
<td>the return location for the gregorian year, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>month</code></em> :</span></p></td>
<td>the return location for the month of the year, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>day</code></em> :</span></p></td>
<td>the return location for the day of the month, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-year"></a><h3>g_date_time_get_year ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_year (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Retrieves the year represented by <em class="parameter"><code>datetime</code></em> in the Gregorian calendar.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>A <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the year represented by <em class="parameter"><code>datetime</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-month"></a><h3>g_date_time_get_month ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_month (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Retrieves the month of the year represented by <em class="parameter"><code>datetime</code></em> in the Gregorian
calendar.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the month represented by <em class="parameter"><code>datetime</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-day-of-month"></a><h3>g_date_time_get_day_of_month ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_day_of_month (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Retrieves the day of the month represented by <em class="parameter"><code>datetime</code></em> in the gregorian
calendar.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the day of the month</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-week-numbering-year"></a><h3>g_date_time_get_week_numbering_year ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_week_numbering_year (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Returns the ISO 8601 week-numbering year in which the week containing
<em class="parameter"><code>datetime</code></em> falls.
</p>
<p>
This function, taken together with <a class="link" href="glib-GDateTime.html#g-date-time-get-week-of-year" title="g_date_time_get_week_of_year ()"><code class="function">g_date_time_get_week_of_year()</code></a> and
<a class="link" href="glib-GDateTime.html#g-date-time-get-day-of-week" title="g_date_time_get_day_of_week ()"><code class="function">g_date_time_get_day_of_week()</code></a> can be used to determine the full ISO
week date on which <em class="parameter"><code>datetime</code></em> falls.
</p>
<p>
This is usually equal to the normal Gregorian year (as returned by
<a class="link" href="glib-GDateTime.html#g-date-time-get-year" title="g_date_time_get_year ()"><code class="function">g_date_time_get_year()</code></a>), except as detailed below:
</p>
<p>
For Thursday, the week-numbering year is always equal to the usual
calendar year. For other days, the number is such that every day
within a complete week (Monday to Sunday) is contained within the
same week-numbering year.
</p>
<p>
For Monday, Tuesday and Wednesday occurring near the end of the year,
this may mean that the week-numbering year is one greater than the
calendar year (so that these days have the same week-numbering year
as the Thursday occurring early in the next year).
</p>
<p>
For Friday, Saturaday and Sunday occurring near the start of the year,
this may mean that the week-numbering year is one less than the
calendar year (so that these days have the same week-numbering year
as the Thursday occurring late in the previous year).
</p>
<p>
An equivalent description is that the week-numbering year is equal to
the calendar year containing the majority of the days in the current
week (Monday to Sunday).
</p>
<p>
Note that January 1 0001 in the proleptic Gregorian calendar is a
Monday, so this function never returns 0.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ISO 8601 week-numbering year for <em class="parameter"><code>datetime</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-week-of-year"></a><h3>g_date_time_get_week_of_year ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_week_of_year (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Returns the ISO 8601 week number for the week containing <em class="parameter"><code>datetime</code></em>.
The ISO 8601 week number is the same for every day of the week (from
Moday through Sunday). That can produce some unusual results
(described below).
</p>
<p>
The first week of the year is week 1. This is the week that contains
the first Thursday of the year. Equivalently, this is the first week
that has more than 4 of its days falling within the calendar year.
</p>
<p>
The value 0 is never returned by this function. Days contained
within a year but occurring before the first ISO 8601 week of that
year are considered as being contained in the last week of the
previous year. Similarly, the final days of a calendar year may be
considered as being part of the first ISO 8601 week of the next year
if 4 or more days of that week are contained within the new year.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ISO 8601 week number for <em class="parameter"><code>datetime</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-day-of-week"></a><h3>g_date_time_get_day_of_week ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_day_of_week (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Retrieves the ISO 8601 day of the week on which <em class="parameter"><code>datetime</code></em> falls (1 is
Monday, 2 is Tuesday... 7 is Sunday).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the day of the week</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-day-of-year"></a><h3>g_date_time_get_day_of_year ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_day_of_year (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Retrieves the day of the year represented by <em class="parameter"><code>datetime</code></em> in the Gregorian
calendar.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the day of the year</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-hour"></a><h3>g_date_time_get_hour ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_hour (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Retrieves the hour of the day represented by <em class="parameter"><code>datetime</code></em>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the hour of the day</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-minute"></a><h3>g_date_time_get_minute ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_minute (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Retrieves the minute of the hour represented by <em class="parameter"><code>datetime</code></em>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the minute of the hour</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-second"></a><h3>g_date_time_get_second ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_second (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Retrieves the second of the minute represented by <em class="parameter"><code>datetime</code></em>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the second represented by <em class="parameter"><code>datetime</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-microsecond"></a><h3>g_date_time_get_microsecond ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_date_time_get_microsecond (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Retrieves the microsecond of the date represented by <em class="parameter"><code>datetime</code></em>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the microsecond of the second</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-seconds"></a><h3>g_date_time_get_seconds ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="returnvalue">gdouble</span></a> g_date_time_get_seconds (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Retrieves the number of seconds since the start of the last minute,
including the fractional part.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of seconds</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-to-unix"></a><h3>g_date_time_to_unix ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="returnvalue">gint64</span></a> g_date_time_to_unix (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Gives the Unix time corresponding to <em class="parameter"><code>datetime</code></em>, rounding down to the
nearest second.
</p>
<p>
Unix time is the number of seconds that have elapsed since 1970-01-01
00:00:00 UTC, regardless of the time zone associated with <em class="parameter"><code>datetime</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the Unix time corresponding to <em class="parameter"><code>datetime</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-to-timeval"></a><h3>g_date_time_to_timeval ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_date_time_to_timeval (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> *tv</code></em>);</pre>
<p>
Stores the instant in time that <em class="parameter"><code>datetime</code></em> represents into <em class="parameter"><code>tv</code></em>.
</p>
<p>
The time contained in a <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> is always stored in the form of
seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the time
zone associated with <em class="parameter"><code>datetime</code></em>.
</p>
<p>
On systems where 'long' is 32bit (ie: all 32bit systems and all
Windows systems), a <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> is incapable of storing the entire
range of values that <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> is capable of expressing. On those
systems, this function returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> to indicate that the time is
out of range.
</p>
<p>
On systems where 'long' is 64bit, this function never fails.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tv</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Date-and-Time-Functions.html#GTimeVal" title="struct GTimeVal"><span class="type">GTimeVal</span></a> to modify</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if successful, else <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-utc-offset"></a><h3>g_date_time_get_utc_offset ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GTimeSpan" title="GTimeSpan"><span class="returnvalue">GTimeSpan</span></a> g_date_time_get_utc_offset (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Determines the offset to UTC in effect at the time and in the time
zone of <em class="parameter"><code>datetime</code></em>.
</p>
<p>
The offset is the number of microseconds that you add to UTC time to
arrive at local time for the time zone (ie: negative numbers for time
zones west of GMT, positive numbers for east).
</p>
<p>
If <em class="parameter"><code>datetime</code></em> represents UTC time, then the offset is always zero.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of microseconds that should be added to UTC to
get the local time</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-get-timezone-abbreviation"></a><h3>g_date_time_get_timezone_abbreviation ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_date_time_get_timezone_abbreviation
(<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Determines the time zone abbreviation to be used at the time and in
the time zone of <em class="parameter"><code>datetime</code></em>.
</p>
<p>
For example, in Toronto this is currently "EST" during the winter
months and "EDT" during the summer months when daylight savings
time is in effect.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the time zone abbreviation. The returned
string is owned by the <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> and it should not be
modified or freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-is-daylight-savings"></a><h3>g_date_time_is_daylight_savings ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_date_time_is_daylight_savings (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Determines if daylight savings time is in effect at the time and in
the time zone of <em class="parameter"><code>datetime</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if daylight savings time is in effect</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-to-timezone"></a><h3>g_date_time_to_timezone ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_to_timezone (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>);</pre>
<p>
Create a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to the same instant in time as
<em class="parameter"><code>datetime</code></em>, but in the time zone <em class="parameter"><code>tz</code></em>.
</p>
<p>
This call can fail in the case that the time goes out of bounds. For
example, converting 0001-01-01 00:00:00 UTC to a time zone west of
Greenwich will fail (due to the year 0 being out of range).
</p>
<p>
You should release the return value by calling <a class="link" href="glib-GDateTime.html#g-date-time-unref" title="g_date_time_unref ()"><code class="function">g_date_time_unref()</code></a>
when you are done with it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tz</code></em> :</span></p></td>
<td>the new <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-to-local"></a><h3>g_date_time_to_local ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_to_local (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Creates a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to the same instant in time as
<em class="parameter"><code>datetime</code></em>, but in the local time zone.
</p>
<p>
This call is equivalent to calling <a class="link" href="glib-GDateTime.html#g-date-time-to-timezone" title="g_date_time_to_timezone ()"><code class="function">g_date_time_to_timezone()</code></a> with the
time zone returned by <a class="link" href="glib-GTimeZone.html#g-time-zone-new-local" title="g_time_zone_new_local ()"><code class="function">g_time_zone_new_local()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-to-utc"></a><h3>g_date_time_to_utc ()</h3>
<pre class="programlisting"><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="returnvalue">GDateTime</span></a> * g_date_time_to_utc (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>);</pre>
<p>
Creates a new <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> corresponding to the same instant in time as
<em class="parameter"><code>datetime</code></em>, but in UTC.
</p>
<p>
This call is equivalent to calling <a class="link" href="glib-GDateTime.html#g-date-time-to-timezone" title="g_date_time_to_timezone ()"><code class="function">g_date_time_to_timezone()</code></a> with the
time zone returned by <a class="link" href="glib-GTimeZone.html#g-time-zone-new-utc" title="g_time_zone_new_utc ()"><code class="function">g_time_zone_new_utc()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the newly created <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-date-time-format"></a><h3>g_date_time_format ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_date_time_format (<em class="parameter"><code><a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> *datetime</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *format</code></em>);</pre>
<p>
Creates a newly allocated string representing the requested <em class="parameter"><code>format</code></em>.
</p>
<p>
The format strings understood by this function are a subset of the
<code class="function">strftime()</code> format language as specified by C99. The %D, %U and %W
conversions are not supported, nor is the 'E' modifier. The GNU
extensions %k, %l, %s and %P are supported, however, as are the
'0', '_' and '-' modifiers.
</p>
<p>
In contrast to <code class="function">strftime()</code>, this function always produces a UTF-8
string, regardless of the current locale. Note that the rendering of
many formats is locale-dependent and may not match the <code class="function">strftime()</code>
output exactly.
</p>
<p>
The following format specifiers are supported:
</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">
<code class="literal">%a</code>:
</span></p></td>
<td>
the abbreviated weekday name according to the current locale
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%A</code>:
</span></p></td>
<td>
the full weekday name according to the current locale
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%b</code>:
</span></p></td>
<td>
the abbreviated month name according to the current locale
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%B</code>:
</span></p></td>
<td>
the full month name according to the current locale
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%c</code>:
</span></p></td>
<td>
the preferred date and time representation for the current locale
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%C</code>:
</span></p></td>
<td>
The century number (year/100) as a 2-digit integer (00-99)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%d</code>:
</span></p></td>
<td>
the day of the month as a decimal number (range 01 to 31)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%e</code>:
</span></p></td>
<td>
the day of the month as a decimal number (range 1 to 31)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%F</code>:
</span></p></td>
<td>
equivalent to <code class="literal">%Y-%m-%d</code> (the ISO 8601 date
format)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%g</code>:
</span></p></td>
<td>
the last two digits of the ISO 8601 week-based year as a decimal
number (00-99). This works well with %V and %u.
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%G</code>:
</span></p></td>
<td>
the ISO 8601 week-based year as a decimal number. This works well
with %V and %u.
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%h</code>:
</span></p></td>
<td>
equivalent to <code class="literal">%b</code>
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%H</code>:
</span></p></td>
<td>
the hour as a decimal number using a 24-hour clock (range 00 to
23)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%I</code>:
</span></p></td>
<td>
the hour as a decimal number using a 12-hour clock (range 01 to
12)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%j</code>:
</span></p></td>
<td>
the day of the year as a decimal number (range 001 to 366)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%k</code>:
</span></p></td>
<td>
the hour (24-hour clock) as a decimal number (range 0 to 23);
single digits are preceded by a blank
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%l</code>:
</span></p></td>
<td>
the hour (12-hour clock) as a decimal number (range 1 to 12);
single digits are preceded by a blank
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%m</code>:
</span></p></td>
<td>
the month as a decimal number (range 01 to 12)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%M</code>:
</span></p></td>
<td>
the minute as a decimal number (range 00 to 59)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%p</code>:
</span></p></td>
<td>
either "AM" or "PM" according to the given time value, or the
corresponding strings for the current locale. Noon is treated as
"PM" and midnight as "AM".
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%P</code>:
</span></p></td>
<td>
like %p but lowercase: "am" or "pm" or a corresponding string for
the current locale
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%r</code>:
</span></p></td>
<td>
the time in a.m. or p.m. notation
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%R</code>:
</span></p></td>
<td>
the time in 24-hour notation (<code class="literal">%H:%M</code>)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%s</code>:
</span></p></td>
<td>
the number of seconds since the Epoch, that is, since 1970-01-01
00:00:00 UTC
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%S</code>:
</span></p></td>
<td>
the second as a decimal number (range 00 to 60)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%t</code>:
</span></p></td>
<td>
a tab character
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%T</code>:
</span></p></td>
<td>
the time in 24-hour notation with seconds (<code class="literal">%H:%M:%S</code>)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%u</code>:
</span></p></td>
<td>
the ISO 8601 standard day of the week as a decimal, range 1 to 7,
Monday being 1. This works well with %G and %V.
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%V</code>:
</span></p></td>
<td>
the ISO 8601 standard week number of the current year as a decimal
number, range 01 to 53, where week 1 is the first week that has at
least 4 days in the new year. See <a class="link" href="glib-GDateTime.html#g-date-time-get-week-of-year" title="g_date_time_get_week_of_year ()"><code class="function">g_date_time_get_week_of_year()</code></a>.
This works well with %G and %u.
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%w</code>:
</span></p></td>
<td>
the day of the week as a decimal, range 0 to 6, Sunday being 0.
This is not the ISO 8601 standard format -- use %u instead.
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%x</code>:
</span></p></td>
<td>
the preferred date representation for the current locale without
the time
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%X</code>:
</span></p></td>
<td>
the preferred time representation for the current locale without
the date
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%y</code>:
</span></p></td>
<td>
the year as a decimal number without the century
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%Y</code>:
</span></p></td>
<td>
the year as a decimal number including the century
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%z</code>:
</span></p></td>
<td>
the time zone as an offset from UTC (+hhmm)
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%:z</code>:
</span></p></td>
<td>
the time zone as an offset from UTC (+hh:mm). This is a gnulib strftime extension. Since: 2.38
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%::z</code>:
</span></p></td>
<td>
the time zone as an offset from UTC (+hh:mm:ss). This is a gnulib strftime extension. Since: 2.38
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%:::z</code>:
</span></p></td>
<td>
the time zone as an offset from UTC, with : to necessary precision
(e.g., -04, +05:30). This is a gnulib strftime extension. Since: 2.38
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%Z</code>:
</span></p></td>
<td>
the time zone or name or abbreviation
</td>
</tr>
<tr>
<td><p><span class="term">
<code class="literal">%%</code>:
</span></p></td>
<td>
a literal <code class="literal">%</code> character
</td>
</tr>
</tbody>
</table></div>
<p>
</p>
<p>
Some conversion specifications can be modified by preceding the
conversion specifier by one or more modifier characters. The
following modifiers are supported for many of the numeric
conversions:
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">O</span></p></td>
<td>
Use alternative numeric symbols, if the current locale
supports those.
</td>
</tr>
<tr>
<td><p><span class="term">_</span></p></td>
<td>
Pad a numeric result with spaces.
This overrides the default padding for the specifier.
</td>
</tr>
<tr>
<td><p><span class="term">-</span></p></td>
<td>
Do not pad a numeric result.
This overrides the default padding for the specifier.
</td>
</tr>
<tr>
<td><p><span class="term">0</span></p></td>
<td>
Pad a numeric result with zeros.
This overrides the default padding for the specifier.
</td>
</tr>
</tbody>
</table></div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datetime</code></em> :</span></p></td>
<td>A <a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>a valid UTF-8 string, containing the format for the
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated string formatted to the requested format
or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> in the case that there was an error. The string
should be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
</div>
<div class="refsect1">
<a name="glib-GDateTime.see-also"></a><h2>See Also</h2>
<a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|