usb/dev-mtp: use GDateTime for formatting timestamp for objects
commit970bc16f60937bcfd334f14c614bd4407c247961
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 30 Apr 2021 11:59:06 +0000 (30 12:59 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 14 Jun 2021 12:28:50 +0000 (14 13:28 +0100)
tree12f52ea63dd521a03864c3ca028c9a2473dcaded
parent39683553f9a66b735a003ad43bb4d1460cef4d64
usb/dev-mtp: use GDateTime for formatting timestamp for objects

The GDateTime APIs provided by GLib avoid portability pitfalls, such
as some platforms where 'struct timeval.tv_sec' field is still 'long'
instead of 'time_t'. When combined with automatic cleanup, GDateTime
often results in simpler code too.

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
hw/usb/dev-mtp.c