select systimestamp(0) from dual
SYSTIMESTAMP(0) |
---|
15-MAR-17 09.41.46.000000 AM -07:00 |
select dbtimezone from dual
DBTIMEZONE |
---|
-07:00 |
create table test_timestamps
(
id number generated by default on null as identity,
systimestamp_col timestamp(0) with local time zone default on null systimestamp,
sysdate_col timestamp(0) with local time zone default on null sysdate,
current_timestamp_col timestamp(0) with local time zone default on null current_timestamp(0),
date_col timestamp(0) with local time zone
)
Table created.
alter session set time_zone='0:00'
Statement processed.
insert into test_timestamps(date_col)
values (timestamp '2017-03-15 19:02:00')
1 row(s) inserted.
select * from test_timestamps
ID | SYSTIMESTAMP_COL | SYSDATE_COL | CURRENT_TIMESTAMP_COL | DATE_COL |
---|---|---|---|---|
1 | 15-MAR-17 04.41.46.000000 PM | 15-MAR-17 09.41.45.000000 AM | 15-MAR-17 04.41.46.000000 PM | 15-MAR-17 07.02.00.000000 PM |
alter session set time_zone='+3:00'
Statement processed.
insert into test_timestamps(date_col)
values (timestamp '2017-03-15 19:05:00')
1 row(s) inserted.
select * from test_timestamps
ID | SYSTIMESTAMP_COL | SYSDATE_COL | CURRENT_TIMESTAMP_COL | DATE_COL |
---|---|---|---|---|
1 | 15-MAR-17 07.41.46.000000 PM | 15-MAR-17 12.41.45.000000 PM | 15-MAR-17 07.41.46.000000 PM | 15-MAR-17 10.02.00.000000 PM |
2 | 15-MAR-17 07.41.46.000000 PM | 15-MAR-17 09.41.46.000000 AM | 15-MAR-17 07.41.46.000000 PM | 15-MAR-17 07.05.00.000000 PM |