[go: up one dir, main page]

Menu

#51 Liquibase export a wrong Timestamp format

v1.0_(example)
accepted
5
2023-04-14
2023-04-14
Yvesdm
No

I found a bug in the liquibase export feature, when exporting a timestamp field, the pattern used to format is incorrect. It uses the day of year, instead of the day of month.

Fix is simple, in LiquibaseXMLTransformer

use lower 'y' and lowerd 'd' in patterns

this.datePattern = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH);
this.timePattern = new SimpleDateFormat("hh:mm:ss", Locale.ENGLISH);
this.timestampPattern = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss", Locale.ENGLISH);

Please find a patch attached for fixing this issue.
Let me know If you prefer a merge request.

Yvesdm

1 Attachments

Discussion

  • Ralf Wisser

    Ralf Wisser - 2023-04-14
    • status: open --> accepted
    • assigned_to: Ralf Wisser
     
  • Ralf Wisser

    Ralf Wisser - 2023-04-14

    Thanks for the report.
    I have applied the patch and will probably publish the fix early next week.

     

Anonymous
Anonymous

Add attachments
Cancel