Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date format has changed for fields in newer versions of dotCMS #25293

Closed
erickgonzalez opened this issue Jun 20, 2023 · 4 comments · Fixed by #25521
Closed

Date format has changed for fields in newer versions of dotCMS #25293

erickgonzalez opened this issue Jun 20, 2023 · 4 comments · Fixed by #25521
Assignees
Labels
LTS: Excluded Ticket that has been excluded from at least one LTS OKR : Customer Support Owned by Scott Priority : 2 High QA : Approved Release : 23.01.5 Included in LTS patch release 23.01.5 Release : 23.08.16 Team : Bug Fixers Type : Defect

Comments

@erickgonzalez
Copy link
Contributor

Parent Issue

#25008

Problem Statement

Same as the issue above, seems that we only fixed for API responses but no for VTL ones.

Steps to Reproduce

1- Create a widget with the following code:

PostingDate vs ModDate</br>
#foreach($con in $dotcontent.pull("+contentType:Blog +(conhost:48190c8c-42c4-46af-8d1a-0cd5db894797 conhost:SYSTEM_HOST)",10,"modDate desc"))
$con.postingDate vs. $con.modDate <br>
#end

2- Add the widget to a page
3- Check the dates, are diff formats

Screenshot 2023-06-20 at 3 20 18 PM

Acceptance Criteria

The date format should be the same as the one of the modDate.

dotCMS Version

23.01 +

Proposed Objective

Customer Support

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://dotcms.zendesk.com/agent/tickets/112060

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@wezell
Copy link
Contributor

wezell commented Jun 21, 2023

the above compares the .toString() methods of the Date objects. The db date is a java.sql.Timestamp and the contentType date is a java.util.Date - this is not really an issue as the values are not wrong? @erickgonzalez can you verify?

#foreach($con in $dotcontent.pull("+contentType:Blog",10,"modDate desc"))
$con.postingDate vs. $con.modDate
$con.postingDate.class vs. $con.modDate.class <br>
#end
Fri Jul 12 18:15:00 UTC 2019 vs. 2023-06-21 14:24:48.777
class java.util.Date vs. class java.sql.Timestamp 

@dsolistorres dsolistorres self-assigned this Jun 28, 2023
dsolistorres added a commit that referenced this issue Jul 14, 2023
dsolistorres added a commit that referenced this issue Jul 17, 2023
dsolistorres added a commit that referenced this issue Jul 17, 2023
dsolistorres added a commit that referenced this issue Jul 18, 2023
@dsolistorres
Copy link
Contributor

PR ready for this issue:
#25521

@erickgonzalez erickgonzalez linked a pull request Jul 19, 2023 that will close this issue
erickgonzalez pushed a commit that referenced this issue Jul 19, 2023
* #25293: return date fields as timestamp in content map to fix date format

* #25293: fix import statements

* #25293: added test to check date format for content map

* #25293: fixed expected date format in test
@erickgonzalez erickgonzalez reopened this Jul 19, 2023
manuelrojas pushed a commit that referenced this issue Jul 20, 2023
* #25293: return date fields as timestamp in content map to fix date format

* #25293: fix import statements

* #25293: added test to check date format for content map

* #25293: fixed expected date format in test
erickgonzalez added a commit that referenced this issue Jul 21, 2023
@josemejias11
Copy link

Approved QA - Tested on master_dc3cb0b_SNAPSHOT // Docker // macOS 13.0 // FF v113.0

Screenshot 2023-07-21 at 12 11 21 PM

@erickgonzalez
Copy link
Contributor Author

Not reproducible in 22.03 LTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS: Excluded Ticket that has been excluded from at least one LTS OKR : Customer Support Owned by Scott Priority : 2 High QA : Approved Release : 23.01.5 Included in LTS patch release 23.01.5 Release : 23.08.16 Team : Bug Fixers Type : Defect
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants