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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:09:15+00:00 2026-06-10T02:09:15+00:00

Is there is any possibility in database, What ever time i am given which

  • 0

Is there is any possibility in database, What ever time i am given which should store as GMT time stamp. If it so, Please share me.

  • 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-10T02:09:16+00:00Added an answer on June 10, 2026 at 2:09 am

    For PostgreSQL, your table should have a column of type timestamp with time zone (timestamptz for short) like this:

    CREATE TABLE tbl (id serial, ts timestamptz);
    

    If what you want to store (let’s call it my_ts) is …

    • a local timestamp without time zone, i.e. it agrees with the current setting of timezone in your client:
      Insert as is, everything is saved as UTC automatically internally:

      INSERT INTO tbl (ts) VALUES my_ts'
      
    • a timestamp with time zone:
      Insert as is, everything is saved as UTC automatically internally:

      INSERT INTO tbl (ts) VALUES my_ts;
      
    • a timestamp without time zone but from another time zone:
      Say, you get timestamp without time zone values from the Olympic Games in London, but your client thinks you are at a different time zone. Transform the timestamp with the AT TIME ZONE construct:

      INSERT INTO tbl (ts) VALUES my_ts AT TIME ZONE 'Europe/London';
      

    If you use the time zone name (instead of a time zone abbreviation, BST in this case), DST (daylight saving time) rules are applied automatically. Details in this related question.
    More about timestamp handling in PostgreSQL in this related answer.


    Now, if you want to display tbl.ts as UTC (~ GMT) timestamp without time zone, regardless of your current time zone, retrieve the values like this:

    SELECT ts AT TIME ZONE 'UTC' FROM tbl;
    

    Note that AT TIME ZONE has a different effect when applied to timestamptz than with timestamp! Read the manual carefully.

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

Sidebar

Related Questions

Is there any possibility in the prefix-function of a given pattern to have something
Is there any possibility to export the Django database into some kind of a
Is there any possibility to make update in the database by using LINQ only
Is there any possibility to Edit String.xml values in Android? Please suggest me the
Is there any possibility to change the text-color of some parts in a textarea
Is there any possibility of giving variable name to hex/rgb numbers in .qss file
Is there any possibility to split classes for a two files like in C++?
Is there any possibility to get the versionCode of an App without the getPackageManager?
Is there any possibility to select a option field by default in a g:select
Is there any possibility to extract globalize2 translation for specified locale without setting I18n.locale

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.