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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:13:42+00:00 2026-05-25T14:13:42+00:00

Maybe the answer is so obvious, I’m not seeing it, but I have a

  • 0

Maybe the answer is so obvious, I’m not seeing it, but I have a question that I’ll risk asking anyway.

I want to allow users of a .NET Web application to enter a date/time, store it in an Oracle database, and no matter which timezone they are in, it always displays as the raw, original version as typed in by the user. So if one user in California enters 2PM and another in Maryland enters 2PM, they would both show as 2PM to a user in Japan. Two types of clients are possible, a web user and a windows client user (connected via web service).

Think of it like I want to completely break all timezone smarts that most applications worry about.

I don’t want to save as a string though. I want a datetime that I can add/remove hours and minutes from.

Edit:

This was basically the exact problem I was having.

  • 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-25T14:13:43+00:00Added an answer on May 25, 2026 at 2:13 pm

    You should always store DateTime in UTC format (universal). When you display it you can choose which ever timezone you wish, in your case this can be fixed for all users, rather than based on location.

    // when recording date time
    DateTime utcDateTime = DateTime.UtcNow;
    
    // parse DateTime back out from string
    DateTime utcDateTime = DateTime.SpecifyKind(DateTime.Parse(dateStr),
                                                DateTimeKind.Utc);
    
    // localized DateTime
    DateTime localDate = utcDateTime.ToLocalTime();
    
    // fixed DateTime based on timezone
    string timeZoneKey = "New Zealand Standard Time";
    TimeZoneInfo timeZone = TimeZoneInfo.FindSystemTimeZoneById(timeZoneKey);
    DateTime nzlocalDate = TimeZoneInfo.ConvertTimeFromUtc(utcDateTime, timeZone);
    

    This takes into account things like day-light savings which can trip you up if start saving localized dates.

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

Sidebar

Related Questions

Maybe the obvious answer is that I need to use a UserControl but I'd
Maybe it's an easy question, but there seems to be no obvious answer. I
This is related to the this question and the answer maybe the same but
It this possible? How? (Maybe silly question, but I couldn't find answer :( )
Maybe it's an obvious answer, but Why on earth would browsers decide to create
Maybe this is a little unconventional question but I'd like to hear an answer
This question may be easy and the answer obvious, but I can't seem to
This may be a silly question with an obvious answer, but I've pondered it
I find this question a little tricky. Maybe someone knows an approach to answer
That may be really simple but I'm unable to find a good answer. How

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.