Re: System Time
Date: Fri, 4 Jan 2008 04:26:57 -0800 (PST)
Message-ID: <5751f042-6588-4d4b-96b6-ebcc6b810b04@l6g2000prm.googlegroups.com>
On 4 Jan., 06:42, l..._at_tech-trans.com wrote:
> Hi!
>
> SQL> select systimestamp from dual;
>
> SYSTIMESTAMP
> ----------------------------------------------------------
> 04-Jan-08 05.40.38.275785 AM +00:00
>
> How can I modify +00:00? Thanks!
>
> Ming
Hi Ming,
SYSTIMESTAMP, along with the ordinary timestamp, displays the DB server time zone (in this case +00:00 = UTC TZ), which is fixed and is not immediately modifyable.
Provided your client is in the same timezone as the DB server, you can get rid of the TZ info with
SQL> select localtimestamp from dual; -- we are now in +00:00
LOCALTIMESTAMP
08-01-04 13:10:16,908000
But if you are in a different timezone, say, +01:00, LOCALTIMESTAMP will include the timezone directly in the timestamp, so
SQL> select localtimestamp from dual; -- we are in +01:00
LOCALTIMESTAMP
08-01-04 14:10:16,908000
^^
And of course you can manipulate the timestamp directly to "modify" the TZ info (but why modify correct info ?) or just get rid of it :
SQL> select to_char(systimestamp,'YYYY-MM-DD HH24:MI:SS:FF') from dual;
TO_CHAR(SYSTIMESTAMP,'YYYY-MM
2008-01-04 13:10:17:846000
- Kenneth Koenraadt