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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:04:39+00:00 2026-06-08T23:04:39+00:00

My settings file has USE_TZ = True and TIME_ZONE = ‘GMT’. I have middleware

  • 0

My settings file has USE_TZ = True and TIME_ZONE = ‘GMT’. I have middleware that checks the user’s timezone and sets that as the current timezone, which is working correctly. However, when I get a datetime field from a form, and store it in the DB, the stored time is US/Eastern instead of UTC. For example, if I have a user whose timezone is US/Central, and they fill out a form with a datetime field in it and select 8:00 AM, it is stored as 9:00 AM in the database. It should be stored as 13:00 (1 PM) in the database, since the offset from US/Central to UTC is 5 hours right now, given daylight savings time. Instead, it’s only offset 1 hour, which suggests US/Eastern.

Any help is greatly appreciated.

  • 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-08T23:04:40+00:00Added an answer on June 8, 2026 at 11:04 pm

    I just figured out that it is actually working correctly, but that the times shown in the django admin are relative to my local time, thus the confusion. The time as stored in the database is actually correctly offset UTC. Rookie mistake, but I’m a rookie.

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

Sidebar

Related Questions

A user of my program has reported problems reading a settings file written by
Every user on my site has a settings file hosted on the server. The
I have an external setting file which has some nodes holiding attribute values of
Ever since deleting the original settings.settings file I have had endless problems getting the
I'm trying to use a settings file to store the user preferences when he/she
I have a need to verify the integrity of a settings file. The file
I have Django project on Dreamhost server which has several views that returns Json
I have an InstallScript project in IS2010. It has a handful of services that
My program has a handful of settings that need to be established before it
I am building a simple C# application that has to write the user input

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.