GitHub user ashr123 added a comment to the discussion: Getting current
date-time format (or default format)
First of all, thank you for answering 🙂
Second, regarding your first comment (i didn't want to quote it) is't not up
for the user to decide how the time will be formatted, I'm the one who controls
it via the attached
[log4j2.json](https://github.com/user-attachments/files/20959920/log4j2.json).
I wanted to let Log4J to take the lead regarding the formatting as I agree the
default formatting won't probably change.
When I used `FixedDateFormat.FixedFormat.DEFAULT.getPattern()` I meant to say
> I didn't came up with the pattern, I took it from _that_ place and if one day
> they will change it to something else, I'm ok with that and when I'll upgrade
> to a new version, it will be changed too
3rd, regarding your last comment, i know that as of version 2.25.0
`FixedDateFormat` is deprecated, this is why we have this discussion 🙂
By the way, i'm parsing the `Last-Modified` HTTP header like so:
```java
final Optional lastModified =
httpResponse.headers().firstValue("Last-Modified")
.map(lastModifiedStr ->
DateTimeFormatter.RFC_1123_DATE_TIME.parse(lastModifiedStr, Instant::from))
```
Where `httpResponse` is of type `java.net.http.HttpResponse` and is created
from `java.net.http.HttpClient`
I hope that I understood you correctly and that was clear 🙂
GitHub link:
https://github.com/apache/logging-log4j2/discussions/3788#discussioncomment-13604168
This is an automatically sent email for dev@logging.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@logging.apache.org