Page 1 of 1

How to report the guest status using correct (local) timezone ?

Posted: 12. Oct 2020, 00:50
by bluegroper
Hi forum
I have various guest VM's running on CentOS 7 host.
The host tz is set to local time. Clocks are correctly synced using ntp servers as usual.

I like to check the status of guest VM's using :

Code: Select all

VBoxManage list vms -l | grep -e ^Name: -e ^State | sed s/\ \ //g | cut -d: -f2-
But this reports the status of each guest VM since datetime in UTC.
How to report the guest status using correct (local) timezone ?
How to change the time-zone setting of existing guest VM's ?
I can see VBoxManage has an option to set the guest time-zone, BUT this only applies when doing an install.
TIA's for any tips or clues.

Re: How to report the guest status using correct (local) timezone ?

Posted: 12. Oct 2020, 03:11
by scottgus1
Virtualbox does not appear to have any setting to control how the time is reported, unless there is a switch buried in the source code. (Scan the PDF of the manual for 'UTC'.)

I have done some scripting in the past related to time, and it is common for computers to report time in UTC, regardless of the source program. Web-search how to convert UTC to local time for a scripting language compatible with your host OS and how to determine your computer's time zone and daylight-savings status. Then convert Virtualbox's output through the conversion script.