Siebel eScript Date Object - errors (Doc ID 479274.1)

Last updated on MARCH 02, 2017

Applies to:

Siebel Tools - Version 7.7.2 [18325] and later
z*OBSOLETE: Microsoft Windows Server 2003
Product Release: V7 (Enterprise)
Version: 7.7.2 [18325] NLD
Database: Oracle 9.2.0.4
""Checked for Relevance on 18-MAR-2016""
Application Server OS: Microsoft Windows 2003 Server
Database Server OS: Sun Solaris 2.8

This document was previously published as Siebel SR 38-2295615751.
""Checked for relevance on 15-Oct-2014""

Symptoms

Having implemented patch 7.7.2.3. in Development we have discovered that one of our work arounds to
a problem with the Date object that we discovered on 7.7.2 and which is now in Production has a different problem with the Date object.

This means that date comparisons where number of days between 2 supplied dates is desired do not work reliably. This is a fatal error as far as the business is concerned.

I have attached an export of a test Business Service which demonstrates the two problems.

Problem 1:
----------

Deriving a number from the Date object via valueOf() function behaves inconsistently depending on the machine date of the PC on which the code runs.

Bizarre though this sounds, it is easy to demonstrate:-

Set the PC date to 30th June 2005.

Run the Business Service "DTG Test" method "TestDateUsingValueOf" supplying a "SiebelDate" input parameter of 1st Feb 2005 ( 02/01/2005 ), get result of 12843; run it again with an input date of 1st Mar 2005 ( 03/01/2005 ), get the same result !

Set the Pc date to today and the problem immediately goes away.

We obviously could not rely on any code which only works by coincidence, so we re-worked this code prior to going live to derive the number via the getTime() function.

Problem 2:
----------

Deriving a number from the Date object via getTime() function fails consistently when supplied certain input dates.

This is easy to demonstrate:-

Run the Business Service "DTG Test" method "TestDateUsingGetTime" supplying a "SiebelDate" input parameter of 31st Dec 2005 ( 12/31/2005 ), an error is raised "Invalid Date Format".

However 30 Dec 2005 and 1st Jan 2006 work correctly.

Again we obviously cannot rely on any code which only works by coincidence.

Summary:
--------

Given that neither of these methods appear to work properly we do not feel it is safe to run any Production batch work at present where date handling is critical in certain processes.

Please could you ...

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms