DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

19
kicks
published 1 year ago, submitted by Sirko 1 year ago

dotnettipoftheday.org — When coding, be careful if you need to perform DateTime calculations (add/subtract) on values representing time zones that practice daylight savings time.

tags: , | tag it

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:
DateTime d;

d = DateTime.Parse("Oct 26, 2003 12:00:00 AM"); //date assignment

d = d.ToUniversalTime().AddHours(3.0).ToLocalTime();



//' - displays 10/26/2003 02:00:00 AM – Correct!

MessageBox.Show(d.ToString());
I thought that the correct result should be 3 a.m. not 2.a.m.
Am I missing something?
posted by dmihailescu 10 months, 18 days ago
Correct result is 2 a.m. because in 2003 daylight savings time ended at 2 a.m. October 26.
http://webexhibits.org/daylightsaving/b.html
posted by manovich 10 months, 11 days ago



information Login or create an account to comment on this story
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge