gtypes: Deprecate GTimeVal in favour of guint64 or GDateTime

GTimeVal is subject to the year 2038 problem, since its `tv_sec` field
is a `glong`, which is 32 bits on 32-bit platforms.

Use `guint64` to represent microsecond-precision time since the Unix
epoch; or use `GDateTime` for full date/time representation.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1438
This commit is contained in:
Philip Withnall
2019-06-14 12:30:11 +01:00
parent e357619d24
commit e3f88f311f
4 changed files with 8 additions and 2 deletions

View File

@@ -123,6 +123,8 @@
* removed from a future version of GLib. A consequence of using `glong` for
* `tv_sec` is that on 32-bit systems `GTimeVal` is subject to the year 2038
* problem.
*
* Deprecated: 2.62: Use #GDateTime or #guint64 instead.
*/
/**