core icon indicating copy to clipboard operation
core copied to clipboard

UT Task210901UpdateDateTimezones not running successfully

Open erickgonzalez opened this issue 3 years ago • 5 comments

Customers upgrading to 22.03 LTS are seeing issues with their time values, it seems that this task is not running as it should.

We need to check the following: 1- it’s changing the column type but not updating the values, need to investigate why? 2- it’s only updating the date fields, we should update the mod_date 3- Even if run, we think the offset has to be multiple by -1, this is because it tells us how many seconds our timezone has a difference between UTC, so we need to add/subtract this accordingly.

Ask support for dataset to test this.

Acceptance Criteria

  • Database should end in the right timezone after run the task
  • Check the date and time before and after the update

erickgonzalez avatar Aug 16 '22 21:08 erickgonzalez

For current customers that experience this issue we need to: 1- Run this query to get the customer timezone: select timezoneid from user_ where userid='dotcms.org.default';

2- Go to https://dateful.com/time-zone-converter and check the hours diff between timezones, e.g between UTC and EST is -5 hours (meaning EST is 5 hours behind UTC)

3- run the following queries, modify as needed: (one for each date field and also for mod_date), this contentlet_as_json is null because we want to update only the old contentlets, new ones should have the right time.

update contentlet set date1 = date1 + interval '18000' SECOND where date1 is not null and contentlet_as_json is null;

erickgonzalez avatar Aug 16 '22 21:08 erickgonzalez

Only applies to 22.03 LTS

erickgonzalez avatar Aug 17 '22 18:08 erickgonzalez

Need to consider change timezone e.g EDT/EST. https://dotcms.zendesk.com/agent/tickets/107650

erickgonzalez avatar Aug 23 '22 17:08 erickgonzalez

See also: #22722

wezell avatar Aug 23 '22 18:08 wezell

Hey team! Please add your planning poker estimate with Zenhub @hmoreras @jcastro-dotcms @jdotcms @rjvelazco

fmontes avatar Sep 09 '22 16:09 fmontes

We need also to update syspublish_date and sysexpire_date of the identifier table

erickgonzalez avatar Oct 07 '22 17:10 erickgonzalez

We need some work here, after testing multiple times locally, with a real data set we are unable to get the expected results.

bryanboza avatar Oct 24 '22 20:10 bryanboza

Fixed, finally we are able to run de upgrade and get the corresponding date/time in each piece of content.

Tested in a real database in postgres // Release-22.10

bryanboza avatar Oct 25 '22 18:10 bryanboza