Description of problem: I created a sync plan as below: katello> sync_plan create --name sync_f15 --org sghai_org --interval hourly --date 2012-01-20 --time 22:30:00 Successfully created environment [ sync_f15 ] Please note that here: - start date is 2012-01-20 and - time is 22:30 ( 10:30 PM ) sync plan list: =============== katello> sync_plan list --org sghai_org ----------------------------------------------------------------------------- Sync Plan List Id Name Description Start Date Interval ----------------------------------------------------------------------------- 1 sync_f15 None 2012/01/21 04:00:00 hourly Please note that in "sync_plan list", date/time both get changed. however it should be similar to what we define in sync_plan create. Version-Release number of selected component (if applicable): [root@dhcp201-163 f15]# rpm -qa | grep -ie katello-0 -ie pulp-0 pulp-0.0.258-1.el6.noarch katello-0.1.178-1.el6.noarch katello-glue-pulp-0.1.178-1.el6.noarch [root@dhcp201-163 f15]# How reproducible: always Steps to Reproduce: 1. Create sync plan 2. list sync_plan 3. Actual results: Sync_plan list shows different sync start date/time from what we have defined at the time of creation Expected results: Should be same. Additional info:
Created attachment 556268 [details] UI is showing correct sync start date/time
Hi Tomas, I don't have the machine where I tested this earlier. However I tried to retest this again and this time I found half an hour difference. I defined the time 22:30 ( 10:30 PM), however 'list' cmd showing 23:00 (11 PM). [root@dhcp201-143 ~]# katello -u admin -p admin shell katello> sync_plan create --name sync_pulpy --org ACME_Corporation --interval hourly --date 2012-01-30 --time 22:30:00 Successfully created environment [ sync_pulpy ] katello> sync_plan list --org ACME_Corporation -------------------------------------------------------------------------------- Sync Plan List Id Name Description Start Date Interval -------------------------------------------------------------------------------- 1 sync_pulpy None 2012/01/30 23:00:00 hourly katello> exit [root@dhcp201-143 ~]# date Mon Jan 30 15:58:40 IST 2012 I retested this with: [root@dhcp201-143 ~]# rpm -qa | grep -ie katello-0 -ie katello-cli-0 -ie pulp-0 pulp-0.0.261-1.el6.noarch katello-cli-0.1.42-1.el6.noarch katello-0.1.195-1.el6.noarch
Also as you suggested I tried to pass timezone (IST) as in input. Here I input the sync time 22:30 (10:30 PM IST) However, the 'list' command again showing 30 min difference. Showing 22:00 (10PM) katello> sync_plan create --name sync_pulp --org ACME_Corporation --interval hourly --date 2012-01-30 --time 22:30:00 IST Successfully created environment [ sync_pulp ] katello> sync_plan list --org ACME_Corporation-------------------------------------------------------------------------------- Sync Plan List Id Name Description Start Date Interval -------------------------------------------------------------------------------- 1 sync_pulpy None 2012/01/30 23:00:00 hourly 2 sync_pulp None 2012/01/30 22:00:00 hourly katello> Please suggest if I'm missing anything here.
There was one more problem with half hour time shifts. Fixed in katello-cli-0.1.48-1 Testing notes: - when you don't enter the timezone, your local timezone is assumed - if you want to enter the timezone, the format is 00:00:00+01:30 (abbreviations like IST won't work)
Verified with following katello build: katello-0.1.206-1.el6.noarch pulp-0.0.263-1.el6.noarch katello-cli-0.1.48-1.el6.noarch sync plan with passing timezone: Input time 14:30 and displayed correctly as 14:30 =============================== katello> sync_plan create --name sync_pulp --org ACME_Corporation --interval daily --date 2012-01-31 --time 14:30:00+05:30 Successfully created environment [ sync_pulp ] katello> sync_plan list --org ACME_Corporation ------------------------------------------------------------------ Sync Plan List Id Name Description Start Date Interval ------------------------------------------------------------------ 1 sync_pulp None 2012/01/31 14:30:00 daily katello> I also tried without passing the timezone with time as below: sync_plan without passing Timezone: ====================================== katello> sync_plan create --name sync_pulp_notz --org ACME_Corporation --interval daily --date 2012-01-31 --time 14:30:00 Successfully created environment [ sync_pulp_notz ] katello> sync_plan list --org ACME_Corporation------------------------------------------------------------------ Sync Plan List Id Name Description Start Date Interval ------------------------------------------------------------------ 1 sync_pulp None 2012/01/31 14:30:00 daily 2 sync_pulp_notz None 2012/01/31 14:30:00 daily However this time UI is showing incorrect time and in both cases (9:00 AM).
Created attachment 558557 [details] Incorrect sync time on UI after defining sync plan from cli.
Hi Tomas. Thanks for fixing this bug from cli.. however now I'm finding incorrect time on UI. not sure if its related to change in cli.
It's the timezone trick again. UI presents (and expects!) all times as GMT while CLI uses local. We have to solve this confusing inconsistency.
As per comment7, sync_plan list is correctly showing the sync time.. So moving this defect to verified state. However there is still an issue with UI as time sync time in cli is not consistent with UI. As per IRC chat.. Tomas is logging another defect for UI. So moving this to verified.