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 3315758
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:23:17+00:00 2026-05-17T22:23:17+00:00

I have a piece of code that checks a time and then adds hours

  • 0

I have a piece of code that checks a time and then adds hours based on the daylight savings time value.

Dim CommentDateTime as Date = "11/2/2010 8:21:42 PM"
If CommentDateTime.IsDaylightSavingTime Then
   'do something
Else
   'do something else
End If

The problem that I’m having is that IsDaylightSavingTime behaves differently on the production server than it does on the development.

On the development server the case is TRUE, but on the production it is false.

Both servers are running the same OS and are both running .NET 3.5

What information can I give to the SA to help troubleshoot my issue?

UPDATE:

The production server is in Arizona, a state that does not observe DST. I’m only concerned with knowing if a certain date/time is DST in the rest of the US that does observe it.

Here’s how I fixed the problem:

If TimeZoneInfo.FindSystemTimeZoneById("Pacific StandardTime").IsDaylightSavingTime(CommentDateTime) Then
     'Do something
Else
     'Do something else
End If

My application only deals with locations located in the US, so this should do the trick.

  • 1 1 Answer
  • 2 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-17T22:23:18+00:00Added an answer on May 17, 2026 at 10:23 pm

    Daylight savings is calculated based on the regional settings of the server. Your dev box probably has different regional settings to your production box.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a piece of code in c# that checks, if a value is
I have this little piece of code that just checks for a particular text
I have the following piece of code that checks whether port 443 is open
I have a piece of Python code that (for better or worse) checks a
I have a small piece of code that checks a string for a url
I have a piece of code that was written by someone else before the
I have this piece of code that does not work: public CartaoCidadao() { InitializeComponent();
I have this piece of code that works fine in subsonic 2.2, I migrated
I have a piece of code that load a very big image in memory.
I have a piece of code that takes several rows from a database and

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.