c# - NodaTime ZonedDateTime not considering clocks going forward -


From the nodes of John Skeet:

While effectively adding "experienced" time - As we will wait twenty minutes, though, at that 1:00 a.m., in Europe / London time zone the clocks go beyond one hour - so we end up at 2:00 pm local time, and not At 1:05 p.m. you might have expected

However, when I try this code, most of its applications are nodecoded Effectively copy and paste from documentation, then variable 01:05:00 , instead of 02:05:00 why this time Not accounting for the field?

  Datimejon London = DateTimeJonoproder. Tzdb ["Europe / London"]; LocalDateTime local = new local time (2012, 3, 27, 0, 45, 00); ZondDateTime = london.Atstrictly (local) before; ZonedDateTime = After the first + period. Contact minutes (20); Debug. WrightLine ("local = {0}", local); Debug Virusline ("before adding 20 minutes = {0}", first); Debug Virline ("20 minutes after adding = {0}", after that);  

Output:

  local = 03/27/2012 00:45:00 before adding 20 minutes = 2012- 03/27 T00: 45: 00 Europe / London (+01) 20 minutes = 2012-03-27 T01: 05: 00 after adding Europe / London (+01)  

< Strong> Update: Based on Dean Ward's answer

I tried 26 instead, still it does not feel the daylight saving change. : (

  Datetime zone London = DateTimeJonoprovides. Tzdb ["Europe / London"]; localdate time local = new locality time (2012, 3, 26, 0, 45, 00); (stratili) (Local); = Zonedated time after the first time. Frame minutes (20);  

Output:

  local = 03/26/2012 00 : 45: 00 20 minutes = 2012-03-26 T00: 45: 00 Europe / London (+01) after adding 20 minutes = 2012-03-26 T01: 05: 00 Europe / London (+01)  There was a change in DST in Europe / London in  


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -