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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:14:06+00:00 2026-05-25T23:14:06+00:00

I have an MVC3 application that is recently published to a web server. This

  • 0

I have an MVC3 application that is recently published to a web server. This server has a different timezone than mine, and that means DateTime.Now on this server is different from my own. That also means that all times shown on the website is shown wrong for me.

The user base for this application all live in the same time zone, so I am looking for a method to override the servers time zone, and use my own timezone instead.

I really don’t want to just add or deduct hours based on the difference, since that will get messed up when daylight saving occurs.

  • 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-25T23:14:07+00:00Added an answer on May 25, 2026 at 11:14 pm

    You could use something like this to convert the current UTC date/time to your local time:

    TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time");
    DateTime localTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, tzi);
    

    Just change the Id passed into TimeZoneInfo.FindSystemTimeZoneById to be your local time zone identifier.

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

Sidebar

Related Questions

I have an MVC3 application that has a custom HandleErrorAttribute so that I can
I have an ASP MVC3 application that has several HttpPost ActionResult methods. During a
I've got an MVC3 web application that has a general search box and displays
I have to develop an ASP.NET MVC3 application in C# and Razor that has
MVC3 vb.net Application using built in session management. I have an mvc3 application that
I have an MVC3 application that I am implementing pjax into . Everything is
I have an MVC3 application that supports multiple languages. Do I need to create
I have lots of forms in my MVC3 application that require the user to
I have an ASP MVC3 application that runs fine (in VS 2010 debug) in
I have a fairly simple Action in an MVC3 application that should render an

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.