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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:42:54+00:00 2026-06-07T08:42:54+00:00

I am new in MVC3 and C# also. I am going to create a

  • 0

I am new in MVC3 and C# also. I am going to create a test blog site by MVC3 with C#. Where user can write post so i need to store user post date-time and wanna show that date-time every other user by there own local time. Everybody thought it better to store date-time in GMT for this case.

I don’t know how to get user local date-time and convert it into GMT and store.
I don’t know how to convert and show that stored date-time in each user local date-time.

please help me. please

  • 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-06-07T08:42:57+00:00Added an answer on June 7, 2026 at 8:42 am

    I will have to respectfully disagree with COLD TOLD only on one point. If you use DateTime.Now, you will get the date & time of the machine that is running your app server. While this is okay, when storing it, you would need to also store the timezone along with it. Otherwise, when converting, you would not know what timezone you are converting from. If you hard-coded it into your app, then you moved it to a data center server in a different timezone, you would have to change that app setting.

    On the other hand, if you always store the date & time using DateTime.UtcNow then you only need to store 1 value in your database. When it comes time to convert it to a timezone locale, you don’t have to hit the database to find out which timezone the info was originally computed against — it is always UTC / GMT.

    var destinationTimeZone = TimeZoneInfo.FindSystemTimeZoneById(
        "US Mountain Standard Time"); 
    
    utc = DateTime.UtcNow;
    mst = TimeZoneInfo.ConvertTimeFromUtc(utcTime, destinationTimeZone);
    
    Console.WriteLine("UTC: " + utc.ToString("yyyy-MM-dd HH-mm-ss"));
    Console.WriteLine("MST: " + mst.ToString("yyyy-MM-dd HH-mm-ss"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new in MVC3 i am going to create a MVC3 test project
My new MVC3 web application allows users to store some information about themselves, and
I am using MS Visual Studio 2010. When i create a new MVC3 project
I am new in MVC3. When i create a new default ASP.NET MVC 3
I am new in MVC3. When i create a strongly typed view it use
I'm new to MVC3 and I can't figure out how to use checkboxes in
I've created a new site using mvc3 and now I'm getting closer to the
I am new to asp.net mvc3 and trying to get a connection going to
I'm relatively new with MVC3, but I'm using it, C# and EF4 to create
I'm new to MVC3 and have been working on a small site using EF

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.