virtiofsd: use GDateTime for formatting timestamp for debug messages
commitd9a801f7e9fd18ce96a0bfff73b785f0a1f8e6a8
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 11 Jun 2021 16:43:20 +0000 (11 17:43 +0100)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 5 Jul 2021 09:51:26 +0000 (5 10:51 +0100)
treef25a6515fe082079bd6efd53ce90ed17ee5cf9c9
parent944bc528421aa848ca218ee535ea923a4147a525
virtiofsd: use GDateTime for formatting timestamp for debug messages

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.

Localtime is changed to UTC to avoid the need to grant extra seccomp
permissions for GLib's access of the timezone database.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20210611164319.67762-1-berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c