Hi Raymond,

I have a question here. Does java.time.format.DateTimeFormatter support
parsing multiple input date formats like joda DateTimeFormatter does?
Support for multiple input date formats was the reason we migrated from
SimpleDateFormat to joda formatter. Please let us know.

On Sun, Sep 13, 2020 at 4:01 AM Raymond Xu <[email protected]>
wrote:

> Hi all,
>
> As there are many different ways of manipulating date time, some of which
> are inferior due to lack of thread-safety, I would like to propose
> standardizing date time APIs in Hudi's codebase.
>
> 1. Use java.time APIs as first class
> 2. Use java.time.Instant as first class for instantiation (e.g., avoid new
> Date())
> 3. Prefer LocalDateTime over Calendar APIs
> 4. Prefer java.time.format.DateTimeFormatter over
> java.text.SimpleDateFormat
> 5. Migrate joda time APIs to java.time and remove the dependency
>
> This is far from an exhaustive list but can be useful for initial
> alignment. Any feedback? If agree on the preference, shall it be added to
> the code guidelines?
>
> Thanks.
>
> Best,
> Raymond
>

Reply via email to