[gnome-boxes/wip/syncup-clock: 8/8] vm-configurator: Sync clock to the host's configured timezone




commit 9f5a2a7dcebf7e8fb050b8f512eeae5a07d435c8
Author: Felipe Borges <felipeborges gnome org>
Date:   Mon Jun 7 16:46:06 2021 +0200

    vm-configurator: Sync clock to the host's configured timezone
    
    When suspending/resuming or reverting to snapshots, the guest's time
    currently doesn't sync up with the host's.
    
    By setting the domain clock offset to LOCALTIME we get the qemu guest
    agent to update the guest's clock to match the hosts.
    
    We were already doing this for Windows guests.
    
    See 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/virtualization_administration_guide/sect-virtualization-tips_and_tricks-libvirt_managed_timers
    
    Fixes #704

 src/vm-configurator.vala | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 28b8e36b..efbaea07 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -63,11 +63,7 @@ public static Domain create_domain_config (InstallerMedia install_media, string
         domain.set_features (features);
 
         var clock = new DomainClock ();
-        if (install_media.os != null && install_media.os.short_id.contains ("win"))
-            clock.set_offset (DomainClockOffset.LOCALTIME);
-        else
-            clock.set_offset (DomainClockOffset.UTC);
-
+        clock.set_offset (DomainClockOffset.LOCALTIME);
         DomainTimer timer = new DomainTimerRtc ();
         timer.set_tick_policy (DomainTimerTickPolicy.CATCHUP);
         clock.add_timer (timer);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]