Aravinth Thangavel (AravinthT)
Tata Consultancy Services

Tata Consultancy Services
AravinthT Member since 2016 16 posts
Tata Consultancy Services
Posted: December 28, 2016
Last activity: January 19, 2017
Posted: 28 Dec 2016 2:55 EST
Last activity: 19 Jan 2017 2:44 EST

addDays(String, int, boolean, String) is inconsistent. When 1 business day is added to the date I am getting the result as the same day as input

We have a requirement where we need to add(1 or 2 or 5) days to the case creation date. I am using the addDays() functon where I pass a dateTime and add number of days accoriding to the requirement. We are using our own calendar which is set in CST time zone and have our set of holidays defined. We are storing the result in DateTime property. We are facing inconsistency where when we add one day to the dateTime passed we are getting the same date. Like, if I pass "20161228T150000.532 GMT" and add one day using addDays(DateTime, 1, true, CalendarName) I am getting the result as "20161228T183000.000 GMT". We are facing the issue only in UAT testing environment. We are not facing the issue in lower environments. The only differene I could find between the two environments is that lower environment server is located in CST time zone and UAT environment server is located in EST time zone.


One important thing to note is that we are facing the issue only when we are running the function before 3PM IST(Indian Standard Time). We are not facing the issue after 3 PM IST on the same day even though we pass the same "20161228T150000.532 GMT" value.

***Updated by moderator: Lochan to add Categories***

Data Integration User Experience
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.