OS/2, eCS & ArcaOS - Technical > Applications

Time sync in VirtualBox guest off by 1 hour

(1/2) > >>

Alex Taylor:
I'm setting up an OS/2 (ArcaOS 5.0.6) guest in VirtualBox 6.1.22 running on Windows 10. 

I've installed the OS/2 Guest Additions, which (among other things) keeps the guest time synced to the host. Except... it insists on setting the guest's time to 1 hour behind the correct time. I assume that it's failing to take DST into account.

My guest TZ value is:

TZ=EST5EDT,3,2,0,7200,11,1,0,7200,3600

which is correct, and works fine for native OS/2 time sync programs like DAYTIME.

My host (Win) is set to the UTC-5 (Eastern US & Canada) zone with daylight saving time enabled. It does show the correct time (which is one hour ahead of what the guest shows).

Has anyone seen this before, and have any ideas how to fix it? This is a real problem. I've temporarily had to disable Additions entirely but that's obviously a terrible workaround.

rdunkle:
I often set the time sync of the VM to be independent of the host operating system.  To disable time sync:
Use a command line:
"C:\Program Files\Oracle\VirtualBox\VBoxManage" setextradata "arca_vm" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1

Olafur Gunnlaugsson:
The VM reads and presents the system time as the host operating system presents it, this means that when you install a guest system you should always instruct the guest operating system not to adjust to daylight savings time, and not to use internet time correction/lookup. It is getting the correct time from the host anyway.

Otherwise both the systems will correct themselves during DST changeovers.

Alex Taylor:

--- Quote from: Richard Dunkle on July 16, 2021, 09:34:19 am ---I often set the time sync of the VM to be independent of the host operating system.  To disable time sync:
Use a command line:
"C:\Program Files\Oracle\VirtualBox\VBoxManage" setextradata "arca_vm" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1

--- End quote ---

Unfortunately, I assume that will have much the same effect on the clock as disabling additions, meaning I can't set it up to sync when resuming the VM from pause state.  The nice thing about the additions is that the clock is constantly kept in sync and doesn't rely on running a remote sync tool at regular intervals like daytime.

It's not good to set up a remote sync tool to run every minute (or less), which is what would be needed to simulate this function in the guest.


--- Quote from: Olafur Gunnlaugsson on July 16, 2021, 11:26:54 am ---The VM reads and presents the system time as the host operating system presents it, this means that when you install a guest system you should always instruct the guest operating system not to adjust to daylight savings time, and not to use internet time correction/lookup. It is getting the correct time from the host anyway.

Otherwise both the systems will correct themselves during DST changeovers.

--- End quote ---

OS/2 doesn't adjust to daylight saving time anyway. Of course, I can set daytime (if I run it) to take DST into account, but I wasn't running daytime while using the additions.

Olafur Gunnlaugsson:

--- Quote from: Alex Taylor on July 17, 2021, 01:45:10 am ---
OS/2 doesn't adjust to daylight saving time anyway. Of course, I can set daytime (if I run it) to take DST into account, but I wasn't running daytime while using the additions.

--- End quote ---

Mine does, what am I doing right?

Navigation

[0] Message Index

[#] Next page

Go to full version