DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Database Time Adjusting

  1. #1
    Join Date
    Feb 2003
    Location
    Tehran/Iran
    Posts
    94

    Database Time Adjusting

    OS: Solaris 8 on Intel
    Database: 8.1.5
    The time reported by using date command is
    about 30 minutes differnet from databse time using
    select to_char(sysdate, 'YYYY-MM-DD hh:mm:ss') from dual;

    How can adjust the time of database.

    Regards
    Hamid

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    No need to adjust anything in the database - it's your format mask that's causing you funky time results. Format mask 'mm' (like 'MM') is for MONTHS, not for MINUTES as you used it. Minutes are denoted with 'MI' (or 'mi').

    Use:

    select to_char(sysdate, 'YYYY-MM-DD hh:MI:ss') from dual;

    and everything will be back to normal...
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Feb 2003
    Location
    Tehran/Iran
    Posts
    94
    Thanks for the answere,
    One guestion is still in my mind:
    Where the databse get the time and how can we adjust the time if we need.

    Regards
    Hamid

  4. #4
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    From the OS, so adjust your OS time
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

Posting Permissions

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


Click Here to Expand Forum to Full Width