Tutorial :XML Timezone - Daylight Saving



Question:

I am currently handling concurrency on my page using a DateTime field. The data is passed through ASP.NET using an XML which comes with Timezone.

So to adjust timezone I am adding 4 hrs to time received (EST) in my procedure and then comparing.

Now it was all working fine till Nov 1st. Now the time I am receiving is 5 hrs behind the time in SQL Server and comparison is failing.

I need to know how to handle such situation? Is there any better way of doing this?

I hope I am clear with the question. Let me know if any more info is needed.


Solution:1

Check out the TimeZoneInfo class. It lets you convert between time zones, and determine the local timezone using the TimeZoneInfo.Local property.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »