-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateTimeFormatter.ofPattern('zzz') does not include daylight/standard time indicator #518
Comments
Hi @mlc Thanks for reporting. It might be a bug or missing functionality, i can reproduce the issue for European timezones as well. Looks like the locale formatter is not aware of daylight savings.
@phueper any ideas ? |
Hi, i don't have an idea... i suppose it is related to locale ... i will try to debug it |
After diving into the locale packages, i figured out that this functionality is simply not yet implemented. |
@pithu i looked a little bit into this ... i believe the problem here is missing support for ZoneRules.isDaylightSavings(), not sure how much effort that would be, i remember, that we talked about this in the past and that it is somehow hard to figure out from the moment data? But i might be wrong here... |
Ok, then that would probably mean that we have to fork the moment-timezone grunt tasks and add the daylight saving information to the packed format. I am not sure how much effort that would be, an entry point to understand how its working might be this HowTo i recently added https://github.com/pithu/js-joda/blob/c954cd5991b90ee5e02d4cd92eaddca379de7821/packages/timezone/HowToUpdateTZDB.md |
ok ... i'll give it a try ... |
fwiw ... some first attempts to get DST info into the timezone packed format are here https://github.com/js-joda/moment-timezone in a clone of moment-timezone |
LGTM. What about a PR in js-joda/moment-timezone ? |
first step ... PR in js-joda/moment-timezone js-joda/moment-timezone#2 |
On the JDK, the
java.time.formatters
for the pattern"zzz"
return eitherEDT
orEST
if you are inAmerica/New York
:However,
js-joda
returns justET
, omitting theD
orS
indicator:I would expect
js-joda
to be consistent with the JDK and with its own docs, and returnEDT
here.The text was updated successfully, but these errors were encountered: