Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1881026

Summary: UI Prints 'Actual timezone in the guest differs from the configuration' due to daylight saving time
Product: [oVirt] ovirt-engine Reporter: Jean-Louis Dupond <jean-louis>
Component: Frontend.WebAdminAssignee: Jean-Louis Dupond <jean-louis>
Status: CLOSED CURRENTRELEASE QA Contact: Qin Yuan <qiyuan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.1CC: ahadas, bugs, jean-louis, ljelinko, sgratch
Target Milestone: ovirt-4.4.4Flags: pm-rhel: ovirt-4.4+
Target Release: 4.4.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-13 11:01:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jean-Louis Dupond 2020-09-21 11:48:36 UTC
Description of problem:
I did setup a new Windows VM with its timezone set to "Romance Standard Time"
This timezone is also configured in Windows itself.

But the oVirt UI keeps complaining:
"Actual timezone in the guest differs from the configuration"


How reproducible:
Always :)


Steps to Reproduce:
1. Create VM with "Romance Standard Time"
2. Install windows and set timezone to Europe/Brussels, Europe/Paris (all in the Romance standard time)

Actual results:
You'll have the warning in the UI overview.

Expected results:
I would expect its fine :)

Additional info:
The warning shows up when the following function returns true:
    private static boolean hasDifferentTimezone(VM vm) {
        if (AsyncDataProvider.getInstance().isWindowsOsType(vm.getVmOsId())) {
            String timeZone = vm.getTimeZone();
            if (timeZone != null && !timeZone.isEmpty()) {
                int offset = 0;
                String javaZoneId = null;
                // convert to java & calculate offset
                javaZoneId = WindowsJavaTimezoneMapping.get(timeZone);

                if (javaZoneId != null) {
                    offset = TimeZoneType.GENERAL_TIMEZONE.getStandardOffset(javaZoneId);
                }

                if (vm.getGuestOsTimezoneOffset() != offset) {
                    return true;
                }
            }
        }
        return false;
    }

This will calculate the offset (from UTC) of "(GMT+01:00) Romance Standard Time".
It does this by regex, so +01:00 -> 60mins offset

Now as far as I see getGuestOsTimezoneOffset returns its real offset (including the daylight saving) so it returns 120.

That is also what the DB tells me :)
 utc_diff | guest_timezone_offset 
----------+-----------------------
     7201 |                   120
(1 row)


And as 120 != 60, warning is shown!

Comment 1 RHEL Program Management 2020-09-21 14:29:43 UTC
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.

Comment 2 Casper (RHV QE bot) 2020-11-13 11:01:54 UTC
This bug has a low overall severity and passed automated regreession suite, it is not going to be further verified by QE. If you believe a special care is required feel free to re-open to ON_QA status

Comment 3 Sandro Bonazzola 2020-11-13 15:43:43 UTC
Arick, I see priority and severity were not set for this bug, can you please check if this needs to go through deeper verification by QE?

Comment 4 Arik 2020-11-15 08:11:32 UTC
I think there's no need for deeper verification by QE in this case

Comment 5 Sandro Bonazzola 2020-12-21 12:38:40 UTC
This bugzilla is included in oVirt 4.4.4 release, published on December 21st 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.