]> git.ipfire.org Git - thirdparty/libvirt.git/commit
src: replace gmtime_r/localtime_r/strftime with GDateTime
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 9 Jan 2020 14:07:15 +0000 (14:07 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 17 Jan 2020 10:02:01 +0000 (10:02 +0000)
commit3caa28dc50df7ec215713075d669b20bef6473a2
tree0b514a98792ed4d71ea98429d509b0dedf06cd5d
parent7c828af8586fcbbf6d4bad4817c5476cd6536a8b
src: replace gmtime_r/localtime_r/strftime with GDateTime

gmtime_r/localtime_r are mostly used in combination with
strftime to format timestamps in libvirt. This can all
be replaced with GDateTime resulting in simpler code
that is also more portable.

There is some boundary condition problem in parsing POSIX
timezone offsets in GLib which tickles our test suite.
The test suite is hacked to avoid the problem. The upsteam
GLib bug report is

  https://gitlab.gnome.org/GNOME/glib/issues/1999

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
14 files changed:
src/conf/domain_conf.c
src/libxl/libxl_domain.c
src/qemu/qemu_command.c
src/qemu/qemu_driver.c
src/util/virtime.c
tests/qemuxml2argvmock.c
tests/virtimetest.c
tools/virsh-checkpoint.c
tools/virsh-domain-monitor.c
tools/virsh-domain.c
tools/virsh-network.c
tools/virsh-snapshot.c
tools/virt-admin.c
tools/vsh.c