Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 388729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:47:52+00:00 2026-05-12T15:47:52+00:00

Using the ASP.NET 3.5 framework, Convert.ToDateTime(Tue, 08 Sep 2009 13:31:00 -0500) returns a DateTime

  • 0

Using the ASP.NET 3.5 framework, Convert.ToDateTime(“Tue, 08 Sep 2009 13:31:00 -0500”) returns a DateTime object with a time of 14:31. Note that I’m on the East Coast (EST -0500) so I should be seeing 13:31. I’m assuming this has to do with Daylight Saving Time (DST) not being accounted for in Convert.ToDateTime.

Is there an elegant way to correct this problem that would work across all time zones?

Is there a different date parsing method I should be aware of that would avoid this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:47:52+00:00Added an answer on May 12, 2026 at 3:47 pm

    Use the DateTimeOffset structure instead:

    DateTimeOffset.Parse("Tue, 08 Sep 2009 13:31:00 -0500")
    

    It also has a constructor that takes a TimeSpan structure. This should respect the DST issue.

    Since you mentioned timezones, another class to look into is the TimeZoneInfo class. These are both new in .NET 3.5. The example from this MSDN page returns:

    Time in Eastern Daylight Time zone: 9/8/2009 3:25:58 PM
        UTC Time: 9/8/2009 7:25:58 PM
    Time in Tokyo Daylight Time zone: 9/9/2009 4:25:58 AM
        UTC Time: 9/8/2009 7:25:58 PM
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a site using asp.net and C# ( framework 1.1 ). Theres
I am fairly new at using the ASP.NET MVC framework and was hoping that
I am designing a web application using the ASP.net MVC framework. I would like
I am wondering what experiences people are having using the ASP.NET MVC Framework? In
My team is considering building our next web app using the ASP.NET MVC framework.
Is there any framework/library for using ASP.NET Membership Provider with confirmation email, something ready
Im currently using vs2008 with asp.net mvc framework for web development. Im missing a
I am using ASP.NET MVC2 and Entity Framework. I am going to simplify the
We are using ASP.net MVC. Which of these is the best DI framework Ninject
I'm creating an application using the ASP.NET MVC 1 framework in C#, where I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.