Bug 1626971

Summary: Discrepancy between set and confirmed retirement date
Product: Red Hat CloudForms Management Engine Reporter: Jan Zmeskal <jzmeskal>
Component: UI - OPSAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED NOTABUG QA Contact: Jad Haj Yahya <jhajyahy>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.10.0CC: dmetzger, hkataria, lavenel, mpovolny, mzazrivec, obarenbo
Target Milestone: GAKeywords: Automation, Regression
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-11 09:51:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
1
none
2
none
3 none

Description Jan Zmeskal 2018-09-10 08:21:53 UTC
Description of problem:
If you are in CFME admin UI and set a VM to retire let's say on 17:00 the next day, the success flash message tells you that the retirement has been scheduled for 15:00.

Version-Release number of selected component (if applicable):
5.10.0.14

How reproducible:
100 %

Steps to Reproduce:
1. Have a CFME appliance with infra provider (this was encountered with RHV 4.2). Have a running VM on that provider.
2. Go to Configuration view for the appliance. Make sure that Appliance Time Zone filed is set to "(GMT+00:00) UTC". See screenshot 1 in attachment.
3.Go to Compute -> Infrastructure -> Virtual Machines -> <your VM>.
4. Click Lifecycle -> Set Retirement Date.
5. Choose 
Enter Retirement Date as == Specific Date and Time
Retirement Date and Time == <Next day at 17:00>
Retirement Warning == None
and click Save. See screenshot 2 in attachment.
6. Inspect the success flash message that is displayed after saving the retirement date.

Actual results:
If you set retirement date for 17:00 of the next day, flash message says "Retirement date set to <next day> 15:00 UTC".

Expected results:
I would expect the flash message to contain the same date and time I have provided in Set Retirement Date view. 

Additional info:
- Appliance time zone has been set to UTC in admin UI.
- The output of command date +"%Z" on the appliance VM is "EDT". However, that probably should not be significant. EDT is -4 when compared to UTC, while the difference in flash message is -2 hours.
- evm.log and production.log from the appliance are in attachment.

Comment 2 Jan Zmeskal 2018-09-10 08:22:19 UTC
Created attachment 1482033 [details]
1

Comment 3 Jan Zmeskal 2018-09-10 08:22:33 UTC
Created attachment 1482034 [details]
2

Comment 4 Jan Zmeskal 2018-09-10 08:22:47 UTC
Created attachment 1482035 [details]
3

Comment 8 Milan Zázrivec 2018-09-11 09:51:10 UTC
Since you're in CEST time zone, the date/time picker for selecting
retirement date & time will be showing times in that zone. 17:00 CEST
is 15:00 UTC, correct?

Closing with NOTABUG.

Comment 9 Jan Zmeskal 2018-09-11 10:04:07 UTC
(In reply to Milan Zázrivec from comment #8)
> Since you're in CEST time zone, the date/time picker for selecting
> retirement date & time will be showing times in that zone. 17:00 CEST
> is 15:00 UTC, correct?
> 
> Closing with NOTABUG.

Yes, I am in CEST time zone, but I specifically said that I configured Time Zone of CFME appliance to UTC. Therefore it should not care where I am physically. I don't agree with closing this as NOTABUG. If the datetime picker is really indeed in CEST, it contradicts with appliance configuration.

Comment 10 Milan Zázrivec 2018-09-11 10:14:24 UTC
A while ago, I had a bz saying the exact opposite of what you're requesting here:
I want the datepicker to display my local time, not UTC.

Obviously, I cannot accommodate both requests, can I?

Besides, appliance configuration is immaterial here:
1. you're retiring a virtual machine, not an appliance
2. the retirement time & date stored with given virtual machine does not contain any timezone
information. Appliance always assumes UTC when reading this information.

If you want to be able to select retirement time, date & *timezone* -> file an RFE.

Comment 11 Jan Zmeskal 2018-09-11 10:53:58 UTC
I have two additional questions: 
1) From where does CFME get information about my time zone (CEST)? Time zone specified in Configuration is UTC and timezone of the appliance VM is EDT. How exactly does it know that I am in CEST.

2) If datetime picker is indeed displayed in CEST, should not this information be exposed to the user. From the user's point of view, such information is *by no means obvious*.

Comment 12 Milan Zázrivec 2018-09-11 11:02:07 UTC
The datepicker component is rendered by your browser and your browser does
know your timezone.

As I wrote before, a nice solution to all confusion here would be the ability to
select date, time & timezone for retirement. But that's really an RFE.

Comment 13 Jan Zmeskal 2018-09-11 12:04:02 UTC
RFE created here: https://bugzilla.redhat.com/show_bug.cgi?id=1627758