Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2013
    Posts
    3

    Unanswered: How to set time in Postgresql database

    There is one day difference in my OS date and time (2013-11-03) and
    Postgresql database date and time (2013-11-04).

    How can I change the date and time in Postgresql

    using any SET command or something like that..

  2. #2
    Join Date
    Nov 2013
    Posts
    3

    what is the use of this forum...!!!

    No one is answering the question... even others questions...!!! ... just people are viewing only.... then what is the use of this...forum... .... ..

  3. #3
    Join Date
    Oct 2010
    Location
    Orlando, FL
    Posts
    311
    Provided Answers: 1
    You mention a difference between OS / System time and Database time but how do you know the O.S. is wrong? Are you using NTP? What version of PostgreSQL? What O.S.?

    If you're too lazy to post the information people need to help you, then people will be too lazy to respond to your problem...

  4. #4
    Join Date
    Oct 2010
    Location
    Orlando, FL
    Posts
    311
    Provided Answers: 1
    Code:
    carlos ~ $ date
    Wed Dec 11 22:22:08 UTC 2013
    carlos ~ $ psql -d postgres
    Password:
    psql (9.3.2)
    Type "help" for help.
    
    postgres=# SELECT current_date AS Date, current_time AS Time;
        date    |        time
    ------------+--------------------
     2013-12-11 | 22:22:12.867614+00
    (1 row)
    Boom!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •