Thank you Anoop and LiuMing.


Best regards,
Yuan

-----Original Message-----
From: Anoop Sharma <[email protected]> 
Sent: Friday, March 09, 2018 11:27 PM
To: [email protected]
Subject: RE: Trafodion systimestamp and current_timestamp

yes, that is correct. All times are returned as local time of the system where 
the master executor (mxosrvr) is running. 

One can also use current_timestamp_utc to return the UTC/GMT equivalent value 
of current time.

If mxosrvr is running in CA and that system's clock is set to represent local 
time, then current_timestamp will return 2018-03-09 10:00:00  (assuming the 
query was issued at 10 am local time) and current_timestamp_utc will return 
2018-03-09 18:00:00  (CA is 8 hours behind gmt).

anoop


-----Original Message-----
From: Liu, Ming (Ming) <[email protected]>
Sent: Friday, March 9, 2018 6:53 AM
To: [email protected]
Subject: RE: Trafodion systimestamp and current_timestamp

Hi,

In Trafodion, current_timestamp is the time on database server. 
And from the parser rules, I found systimestamp is synonym of 
current_timestamp. So they are identical in Trafodion.

IMHO: If people want client timestamp, it should be implemented in the driver I 
think, which application can also get via calling gettimeofday() in C/C++ or 
from system package in java. So I don't think there is a strong requirement for 
this?

Thanks,
Ming

-----Original Message-----
From: Liu, Yuan (Yuan) <[email protected]>
Sent: Friday, March 09, 2018 6:25 PM
To: [email protected]
Subject: Trafodion systimestamp and current_timestamp

Hi trafodioneers,

It happened that I found Trafodion support both systimestamp and 
current_timestmap, though systimestamp is not documented in official SQL manual 
document.

I'd like to make sure is that true that systimestamp represents server 
timestamp and current_timestamp represents client timestamp?

>>select systimestamp from dual;

(EXPR)
--------------------------

2018-03-09 18:17:58.534957

--- 1 row(s) selected.
>>
>>
>>select current_timestamp from dual;

(EXPR)
--------------------------

2018-03-09 18:18:18.844576

--- 1 row(s) selected.



Oracle has such documentation as below,
SYSTIMESTAMP returns current timestamp on database server, while 
current_timestamp returns current timestamp on client machine. So if your 
database server is in New York and client box is in California, SYSTIMESTAMP 
will be 3 hours ahead of CURRENT_TIMESTAMP.


Best regards,
Yuan

Reply via email to