best way to locate a time zone in Europe?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Then I picked Berlin because I know it is in Germany. This doesn't feel like an efficient way of finding out this information. Is there a "standard" list/map of time zones people in Europe use? For example, in the US.
Granted I don't do this often and my approach worked. But it did get me curious.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
If I do need to find out a specific time zone, I just hit Google. The first few site provide plenty of information, and Google Images shows maps of time zones.
Is there a reason you need Europe/Berlin over CEST?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Stephan van Hulst wrote:It's not really an issue over here, because most countries here are only in one time zone, and we rarely need to deal with time zones of other countries.
Funny. That's the same reason I don't know. (As someone in the US, I rarely deal with time zones in other countries.)
Stephan van Hulst wrote:Is there a reason you need Europe/Berlin over CEST?
Because I don't know any better? It doesn't matter for my toy program. I suspect I do want CEST (central european standard time) because my question was about more general time zones. And because I can't find CEST in the list of Java time zones.
1) There's nothing with CEST in the name.
2) Here's what the choices are for names containing Central (clearly not the answer:)
3) And here's what the choices are for names containing Europe:
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Instead, you can use whatever time zone you want that obeys Daylight Saving Time. In the Netherlands, we usually use Europe/Amsterdam or Europe/Paris and I've even seen Europe/Madrid. Europe/Berlin or Europe/Hessen would also work.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
That would be more interesting if I had a map in front of me
. I do recognize the countries they are from, but not the time zones they are in. [teasing - I did look at a map][OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
What about Lisbon? At the risk of being moved to MD, why does Portugal which is far west of Britain use a time zone one hour ahead of us?Stephan van Hulst wrote: . . . Brussels, Copenhagen, Madrid and Paris together in a separate category.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
If you try to change the time zone of your Windows clock, you'll notice that Lisbon and London are in the same option.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Mike Simmons wrote:Yeah, the problem of identifying your correct time zone from among the various candidate ids - that hasn't really changed since Java's inception. It's really all from the tz database - I like using the list here. The [continent]/[city] IDs (like America/Los_Angeles) seem to offer the most comprehensive list of options, but can be hard to navigate for folks not very familiar with the region in question. the [country]/[specifier] IDs (like US/Pacific) are much more readable, at least for the US - but Europe doesn't seem to have an equivalent. Too bad.
new GregorianCalendar(locale).getTimeZone()?
Oracle Certified Professional: Java SE 6 Programmer && Oracle Certified Expert: (JEE 6 Web Component Developer && JEE 6 EJB Developer)
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Dieter Quickfend wrote:
Mike Simmons wrote:Yeah, the problem of identifying your correct time zone from among the various candidate ids - that hasn't really changed since Java's inception. It's really all from the tz database - I like using the list here. The [continent]/[city] IDs (like America/Los_Angeles) seem to offer the most comprehensive list of options, but can be hard to navigate for folks not very familiar with the region in question. the [country]/[specifier] IDs (like US/Pacific) are much more readable, at least for the US - but Europe doesn't seem to have an equivalent. Too bad.
new GregorianCalendar(locale).getTimeZone()?
Nope. This still uses the default time zone, ignoring locale. If I do this with Locale.CHINA, I get the America/Denver time zone.
Also, GregorianCalendar is evil, and if we're using Java 8, we wish to avoid it at any cost.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Mike Simmons wrote:Also, GregorianCalendar is evil, and if we're using Java 8, we wish to avoid it at any cost.
Definitely! I'm really impressed with the Java 8 time classes.
All: Interesting discussion about time zones.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
| The knights of nee want a shrubbery. And a tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |










