[EXTDAM-291] Bynder - Make date time pattern more configurable Created: 01/Sep/21  Updated: 26/Aug/22

Status: Open
Project: External DAMs
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Yen Lac Tue Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: 0.25h
Original Estimate: Not Specified

Issue Links:
Relates
relates to EXTDAM-283 Bynder Asset Date parsing problem Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: Extdam Later
Story Points: 3
Team: AuthorX

 Description   

This is the follow up ticket for EXTDAM-283 to improve Bynder date time parser

Problem

In class BynderAsset the date is parsed with this format


inputFormatter 
= DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ENGLISH);

But it seems that we receive also the milliseconds '2021-07-27T15:04:04.707Z'

Solution

Make inputFormatter (yyyy-MM-dd'T'HH:mm:ss'Z') configurable

Propose second dateTime pattern in try catch in case the parse throw error (the problem may come from Bynder instance when user update multiple assets and the dateModified append milliseconds 

Workaround

Development notes


Generated at Mon Feb 12 01:53:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.