Project

General

Profile

Bug #21145

CV erratum filter rules - start_date displayed wrong if browser timezone is behind UTC

Added by Dan Seethaler about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1478132

Description of problem:

Timezone was set to America/Toronto, local date and time was 2017-08-03 11:12:03, start date was set to 2017-08-03. CV, CV filter and CV filter rule were created via API.
However, UI shows start_day for previous day, 2017-08-02.
API shows correct date.

2017-08-03 11:12:03 7ddffec5 [app] [I] Started POST "/katello/api/v2/content_view_filters/18/rules" for 10.36.117.101 at 2017-08-03 11:1
2:03 -0400
2017-08-03 11:12:03 7ddffec5 [app] [I] Processing by Katello::Api::V2::ContentViewFilterRulesController#create as */*
2017-08-03 11:12:03 7ddffec5 [app] [I] Parameters: {"end_date"=>"2017-08-08", "content_view_filter_id"=>"18", "date_type"=>"issued", "
start_date"=>"2017-08-03", "api_version"=>"v2", "content_view_filter_rule"=>{"end_date"=>"2017-08-08", "content_view_filter_id"=>"18", "date_type"=>"issued", "start_date"=>"2017-08-03"}}

Version-Release number of selected component (if applicable):
Satellite 6.3.0 Snap 9.0:
  • satellite-6.3.0-16.0.beta.el7sat.noarch
  • katello-3.4.2-1.el7sat.noarch
  • foreman-1.15.2-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Set timezone behind UTC, e.g. -4
2. Create CV, Erratum CV filter and filter rule via API and set start_date to current date.
3. Navigate to Content -> Content Views -> Yum Content -> Filters and check start date

Actual results:
Date is set to 1 day before current date.

Expected results:

Additional info:

Associated revisions

Revision e0255c2a (diff)
Added by Dan Seethaler about 3 years ago

Fixes #21145: erratum filter rules start_date fix

The dates sent to the api from the ui should only include the
timezone offset and not any other time data. This change removes
the hours from the dates and leaves only the timezone offset.

http://projects.theforeman.org/issues/21145

Revision 73cd6902 (diff)
Added by Walden Raines over 2 years ago

Fixes #21145: fix start date timezone issue for CV filter.

Ensure the start/end date is specified as UTC for errata
filters.

http://projects.theforeman.org/issues/21145

History

#1 Updated by Dan Seethaler about 3 years ago

  • Assignee set to Dan Seethaler

#2 Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6977 added

#3 Updated by Anonymous about 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Justin Sherrill about 3 years ago

  • Legacy Backlogs Release (now unused) set to 250

#5 Updated by Walden Raines almost 3 years ago

  • Assignee changed from Dan Seethaler to Walden Raines
  • Status changed from Closed to Assigned

#6 Updated by Walden Raines almost 3 years ago

  • Target version set to 234

#7 Updated by Walden Raines almost 3 years ago

  • Target version changed from 234 to 237

#8 Updated by Walden Raines almost 3 years ago

  • Target version changed from 237 to 239

#9 Updated by Walden Raines almost 3 years ago

  • Status changed from Assigned to New

#10 Updated by Walden Raines over 2 years ago

  • Target version changed from 239 to 243

#11 Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7172 added

#12 Updated by Walden Raines over 2 years ago

  • Status changed from Ready For Testing to Closed

#13 Updated by Andrew Kofink over 2 years ago

  • Legacy Backlogs Release (now unused) changed from 250 to 339

Moving to 3.5.2 because it didn't make it into 3.5.0 or 3.5.1 in time.

Also available in: Atom PDF