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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:04:25+00:00 2026-06-14T04:04:25+00:00

Does anyone know what would be the right type of a MySQL column in

  • 0

Does anyone know what would be the right type of a MySQL column in order to store the date in the following format? Ex: 2012-11-11T11:09:28+00:00

Update:
The part I was interested in was how to store the timezone +xx:xx of the user that took the action and the question was if there’s is a MySQL date format that would include the timezone as well. Read the MySQL docs and didn’t find any relevant information, that’s why I wrote here.

  • 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-14T04:04:27+00:00Added an answer on June 14, 2026 at 4:04 am

    There’s no DATE/TIME column type in MySQL that includes the timezone. It’s also not really necessary, since a timestamp is a timestamp, it’s an absolute point in time. The timezone is only relevant if you want to format the timestamp as a local time, but MySQL stores dates as absolute points in time, regardless of timezone.

    If you want to store a value including timezone information, you’ll have to store it as a string.

    But, the better strategy is this anyways:

    • normalize all times in your application to one timezone, UTC being a good choice
    • store that normalized time in the database
    • store a user preference for his/her preferred timezone
    • when fetching times from the database to display, convert them from UTC to the desired timezone of the user

    That’s the typical way to handle this. You can also store a timezone in another column next to the timestamp column, if that makes sense for your app:

    `time_utc` (DATETIME) | `timezone` (VARCHAR)
    ----------------------+---------------------
    2012-11-11 11:11:11   | Europe/Berlin
    

    This way you have unified timestamps in your database to do calculations/queries on, while being able to format them in a local time when needed.

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

Sidebar

Related Questions

Does anyone know how I would go about changing (transforming) an image based on
Does anyone know of a library that would allow me to manipulate Flex DOM
Does anyone know a script which would wrap old Products namespace style Plone add-on
Does anyone know the display formatter that I would need to add to the
Does anyone know of a C# spell check library that would underline misspelled works
Does anyone know why a library initialized within dlopen() would initialize a static variable
Does anyone know of an equivalent to FxCop/StyleCop for Delphi? I would really like
Does anyone know about a SQL statements parser, in Java, that would allow having
I would like to know how Gmail (or anyone else) does comet on Opera.
Does any one know how I would have to change the following to work

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.