Hi All,
I have an issue with Datetime Column in table with Application insertion.
Application Server and DB Server located into EST Time and client is entering data from IST time.
below is table Structure
CREATE TABLE SAMSUNGADMIN.RDE_REPAIR
(
REPAIR_ID NUMBER(6) NOT NULL,
INV_LOC_ID NUMBER(6) NOT NULL,
BRANCH_ID NUMBER(6) NOT NULL,
REP_DATEDATE DATE,
UNIT_TYPE VARCHAR2(30 BYTE),
FAILURE_CODE VARCHAR2(100 BYTE),
FAULTY_COMPONENT VARCHAR2(100 BYTE),
COMPONENT_LOCATION VARCHAR2(50 BYTE),
COMPONENT_PART VARCHAR2(50 BYTE),
QTY VARCHAR2(10 BYTE),
ECO VARCHAR2(50 BYTE),
REWORK_CODE VARCHAR2(50 BYTE),
REWORK_BY VARCHAR2(50 BYTE),
REMARKS VARCHAR2(500 BYTE),
REPAIR_ORD VARCHAR2(10 CHAR),
SECTION VARCHAR2(30 CHAR),
BERCODE VARCHAR2(60 CHAR),
BER_REASON VARCHAR2(100 CHAR),
ITEM_CODE VARCHAR2(200 CHAR),
IS_DELETED CHAR(1 CHAR) DEFAULT 'N' NOT NULL,
CREATED_BY VARCHAR2(30 BYTE),
CREATED_DATE TIMESTAMP(6) DEFAULT systimestamp AT TIME ZONE 'Asia/Kolkata' NOT NULL,
MODIFIED_BY VARCHAR2(30 BYTE),
MODIFIED_DATE DATE
)
Problem is when inserting data from India client End using Web URL, Below rows is getting inserted. we have inserted a test record at 16-Oct-18 12:00:15 (IST Time). Problem is Default systemstamp has been assigned to created_date not for rep_datedate and rep_datedate is accepting IST time and created_date accepting EST time.
REPAIR_ID CREATED_DATE REP_DATEDATE UNIT_TYPE
---------- ------------------------------ ------------------------------ --------------------
10 16-OCT-18 02.30.15.777349 AM 16-OCT-2018 12:00:15
Kindly suggest what is wrong with Column or where I should debug this.
Thanks in Advance.