You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ppkarwasz (via GitHub)" <gi...@apache.org> on 2023/04/08 18:41:26 UTC

[I] Date and time patterns should follow `DateTimeFormatter` (logging-log4j2)

ppkarwasz opened a new issue, #1416:
URL: https://github.com/apache/logging-log4j2/issues/1416

   In release 2.x date time patterns follow [`SimpleDateFormat`](https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html) with additional extensions provided by [`FastDateFormat`](https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/time/FastDateFormat.html) and support for the `n` specifier for nanoseconds.
   
   The exception is JSON Template Layout, which uses the format specifiers from [`DateTimeFormatter`](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html).
   
   In release 3.x we should switch all format specifiers to those documented `DateTimeFormatter`.
   
   The major differences are:
   
    * `u` means day-of-week in SDT and era in DTF,
    * SDT lacks `L` meaning month as text,
    * SDT lacks `q` and `Q` as quarter,
    * in DTF `Z`, `ZZ` and `ZZZ` all mean the same format for the time zone (e.g. `-0800`, `+0000`). In FDT `ZZ` uses the ISO 8601 format with a colon (e.g. `-08:00`, `Z`) and `ZZZ` adds a colon to the original `Z` format (e.g. `-08:00`, `+00:00`).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Date and time patterns should follow `DateTimeFormatter` (logging-log4j2)

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on issue #1416:
URL: https://github.com/apache/logging-log4j2/issues/1416#issuecomment-1502375240

   SDT -> SDF?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Date and time patterns should follow `DateTimeFormatter` (logging-log4j2)

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on issue #1416:
URL: https://github.com/apache/logging-log4j2/issues/1416#issuecomment-1502146385

   Even though this will be a (slightly?) breaking change, can't we rather implement this on `2.x`? As long as we clearly indicate this in release notes, this feels legit to me. @rgoers, WDYT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org