[
https://issues.apache.org/jira/browse/OOZIE-2867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998985#comment-15998985
]
Robert Kanter commented on OOZIE-2867:
--------------------------------------
Thanks for uploading a patch.
Looking into this some more, I think we should recommend _not_ using the
three-letter ids instead of recommending the "Continent/City" ids. There's a
few issues:
# IIRC, the available timezones can vary based on JVM and locale. That's why
Oracle doesn't provide a list of timezones but instead suggests
{{TimeZone.getAvailableIDs()}}.
# There's some additional "continents" that the patch is missing: "Antarctica",
"Canada", "Mexico", "US" (among others) which should work correctly.
# The previous issue ties into the next issue: "Continent/City" isn't really
correct. For instance, "Pacific" or "Indian" aren't continents. I guess
"Region/City" would be more accurate. Unfortunately, Oracle doesn't give this
syntax an official name as far as I can tell. However, there's also some
timezones that are simply country names with no city, like "Israel" or
"Iceland". So that's not really correct either.
The real problem is with the three-letter ids - all other ids are fine.
Besides the DST issue we saw, [the
docs|https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html] even
say that some of them are deprecated because they're ambiguous. e.g. CST is
Central Standard Time and China Standard Time.
So I'd suggest these changes:
# Replace {{CONTINENT_PATTERN}} with something like
{{THREE_LETTER_ID_PATTERN="[A-Z]{3}"}} and give the warning when it matches
this; though make sure to still allow okay ones like "GMT" and "UTC". And of
course update the wording of the message and docs to match.
# Can you add a brief explanation to the docs on why we don't recommend using
the three letter ids? Basically that it won't handle DST shifts properly and
maybe an example? (e.g. "America/Los_Angeles" vs "PST" and "PDT")
# Updating the description text for {{oozie info -timezones}} is a good idea
# I don't think we really need the log trace line. The timezone should be
logged elsewhere already.
# Looks like there's a line that's too long
> Timezone handling for Coordinators: emphasize "Continent/City" format
> ---------------------------------------------------------------------
>
> Key: OOZIE-2867
> URL: https://issues.apache.org/jira/browse/OOZIE-2867
> Project: Oozie
> Issue Type: Sub-task
> Components: coordinator
> Affects Versions: 4.3.0
> Reporter: Andras Piros
> Assignee: Artem Ervits
> Fix For: 5.0.0
>
> Attachments: OOZIE-2867-0.patch, OOZIE-2867-1.patch
>
>
> It seems that some time zone abbreviations like {{BST}} for British Summer
> Time silently just do not get accepted correctly by Oozie and the underlying
> JVM.
> It would be great to:
> * emphasize in the Coordinator Functional Specification that it's best to
> only use time zone format {{Continent/City}}, like {{Europe/London}}, or
> {{America/Los_Angeles}}, instead of other formats like {{PDT}}, {{PST}}, or
> {{BST}}
> * if the timezone is not recognized by Oozie, it's best to emit a {{WARN}}
> log and suppose {{UTC}} instead of silently ignoring the unknown specified
> timezone
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)