Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

ZonedDateTime for daylight savings

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hy,
can someone please explain why this code behave differently for US and EU? Does Java thinks Europe doesn't follow daylight savings time?



I get:


2016-03-13T01:30-05:00[US/Eastern]
2016-03-13T01:30+01:00[Europe/Berlin]
2016-03-13T03:30-04:00[US/Eastern]
2016-03-13T02:30+01:00[Europe/Berlin]

2016-11-06T01:30-04:00[US/Eastern]
2016-11-06T01:30+01:00[Europe/Berlin]
2016-11-06T01:30-05:00[US/Eastern]
2016-11-06T02:30+01:00[Europe/Berlin]
2016-11-06T02:30-05:00[US/Eastern]
2016-11-06T03:30+01:00[Europe/Berlin]


 
Marshal
Posts: 76472
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try changing the date. Summer time didn't start here until 27th March in 2016.
By the way, zoneEU is not an accurate name because the EU covers at least three timezones (GMT in Portugal and Ireland, CET=GMT+01:00 in France and Germany, and I think EET=GMT+02:00 in Romania etc).
 
lux Green
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't want to be rude, but I think you did not understand a question.
Question is about that day when clocks go either 1 hour early or 1 hour later. It happens in whole world at a same date. 2016 was 13.March and 6.November, respectively.
I left that variable name because I tried changing different EU zones, but with same result...
 
Saloon Keeper
Posts: 26057
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

lux Green wrote:I don't want to be rude, but I think you did not understand a question.
Question is about that day when clocks go either 1 hour early or 1 hour later. It happens in whole world at a same date. 2016 was 13.March and 6.November, respectively.
I left that variable name because I tried changing different EU zones, but with same result...



Whatever in the world gave you that idea?
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

lux Green wrote:I don't want to be rude, but I think you did not understand a question.
Question is about that day when clocks go either 1 hour early or 1 hour later. It happens in whole world at a same date. 2016 was 13.March and 6.November, respectively.
I left that variable name because I tried changing different EU zones, but with same result...



Most northern hemisphere countries that use DST change over on the last Sunday of March and back on the last Sunday of October, so the 27th and 30th respectivley for 2016.

See here:
https://www.timeanddate.com/time/dst/2016.html
 
Tim Holloway
Saloon Keeper
Posts: 26057
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
These are the dates when DST/Summer Time go into effect next:

https://www.timeanddate.com/time/dst/events.html

Note that Fiji actually switched about a month ago.

So no, DST does not change at the same time either world-wide or even hemisphere-wide.

And here is information on the TZDATA database, which includes changeover rules:

https://en.wikipedia.org/wiki/Tz_database
 
lux Green
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
pff I am blown away with this. thanks for clarification.
 
Barry's not gonna like this. Barry's not gonna like this one bit. What is Barry's deal with tiny ads?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic