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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:39:37+00:00 2026-05-11T18:39:37+00:00

I am having a project which will have country dropdown at the top to

  • 0

I am having a project which will have country dropdown at the top to select countries. For example USA, India and Hong Kong. Depends on the country selection several features will be enabled or disabled.

In project I am having base country by default for example India. So whenever any user will come. I want to store its login datetime as per Indian standard time regardless user is from Hong Kong, USA or India. My webserver is hosted in USA.

Is that possible?

  • 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-11T18:39:37+00:00Added an answer on May 11, 2026 at 6:39 pm

    What you want to do is store any datetime value as UTC. Which means storing as a time zone independent value.

    You can either set some sort of insert trigger in your MS-SQL server (I assume you use MS-SQL because of the asp.net part). There you determine the UTC time like this.

    `-- MS SQL (use instead of GETDATE())
    DECLARE @currentTime datetime
    SET @currentTime = GETUTCDATE()`
    

    If you want to do it in code just use UtcTimeNow to access the UTC time.

        // C# (use instead of DateTime.Now)
    DateTime currentTime = DateTime.UtcNow;
    

    If you want you can always convert the UTC time to any given local time. By using the TimeZoneInfo class.

    That way you have the right time in your database (UTC) and can convert it to the appropriate time for the User.

    The most important part when dealing with times and timezones is to store it as UTC. That way it’s can be transported and compared easily.

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

Sidebar

Related Questions

About to start a new project in VS2010 which will have a few windows
I have a requirement on my current project (a Flex app which will be
I have a project which will need to have some Java layer. I am
I have a Java project which will include a number of large SQL statements
I have a small project which will use iPad as an information kiosk for
I am having a problem in my project which is based on iframe. It
I am having trouble trying to get NAnt to compile my project, which consists
I have web application Project having RPC call. one RPC async is working fine.
Over the years I have vacillated between having my project/source folders in a directory
Anyone else playing with ironruby? I have successfully got the IronRuby.Rails.Example project running on

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.