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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:16:22+00:00 2026-05-23T10:16:22+00:00

I am writing an Entity Framework 4.1 application. In this application I have a

  • 0

I am writing an Entity Framework 4.1 application. In this application I have a History class defined as follows:

public class History
{
    public Guid Id { get; set; }
    public DateTime HistoryDate { get; set; }
}

However, when I look in the database, it appears to store the date as local time. My company doesn’t exist in one time zone and so will this cause issues? Is there something more I need to do to store the date and time as UTC, or is it already stored as UTC in SQLite and I’m just seeing the result in my local time. Here is some sample output of what I see:

select id, historydate from history limit 1;
000846d3-f91d-47bb-9963-baf9530e0229|2004-10-28 16:57:00

Thanks in advance!

  • 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-23T10:16:23+00:00Added an answer on May 23, 2026 at 10:16 am

    Store the date in UTC, and use the ToLocalTime when accessing the value to have it in local time:
    http://msdn.microsoft.com/en-us/library/system.datetime.tolocaltime.aspx

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

Sidebar

Related Questions

I am writing a new application using the Entity Framework. Where would the EF
My application is SL2 reading and writing data through an Entity Framework Model exposed
I am writing an asp.net mvc application to learn Entity Framework with and am
I'm writing an application that has POCO Entity Framework data access on the server.
I'm writing this question from the standpoint of an ASP.NET application. However I realize
I'm building a small timing application using the MVVM pattern, using entity framework for
I have a database table and a corresponding entity class (POCO with change tracking
I am currently programming a ASP.NET MVC3 application, using Entity Framework 4. There are
I have an Entity-class having a Property of type Int32: on generating DDL using
I am considering using xVal for validation of Entity Framework classes in a MVC

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.