I need to update a column in database with current timestamp offset "X" number of hours (in short Current timestamp minus 7 hours).
I have a job that looks like this
Code: Select all
ROW_GEN--------------> TFR------------->ORACLE_ENT
I also convert my Current Timestamp() into unix time using "TimetFromTimestamp" function. I then subtract both and convert the unix time t to timestamp using "TimestampFromTimet" .
For instance if I have offset as 2 hours and current timestamp is
2007-08-17-12.00.00 then I should get 2007-08-17-10.00.00.
But I get 2007-08-17-09.00.00, that is if I pass 2 hours as offset I get 3 hours off.
Any pointers. Is there an another way to do this?