tg icon indicating copy to clipboard operation
tg copied to clipboard

Migration to LocalDate, LocalDateTime and LocalTime

Open 01es opened this issue 2 years ago • 0 comments

Description

This issue covers the work required to migrate off java.util.Date to java.time.LocalDate and java.time.LocalDateTime.

Properties annotated @DateOnly should be converted to java.time.LocalDate and the annotation can be deprecated or event removed.

Properties annotated @TimeOnly should be converted to java.time.LocalTime and the annotation should be deprecated or event removed.

Specific use cases to consider and test:

  • [ ] 1. Persistent type IUtcDateTimeType needs to be refactored to work with java.time.LocalDate and java.time.LocalDateTime.
  • [ ] 2. Timezone independent mode. The current hypothesis is that special support for this mode can potentially be removed, making all TG-based applications timezone independent.
  • [ ] 3. Consider the implication for daylight saving/losing situations.
  • [ ] 4. The use of JodaTime API should be refactored and this dependency removed.
  • [ ] 5. Adjust domain model verifier to recognise java.time.LocalDate, java.time.LocalDateTime as java.time.LocalTime as valid property types and to restrict the use of java.util.Date.

References

[1] https://docs.oracle.com/javase/tutorial/datetime/TOC.html

Expected outcome

The use of modern Java Time API.

01es avatar Oct 11 '23 02:10 01es