Getting 05:30 hours difference when fetching date from a form's date field
Hi all,
I am trying to fetch a date field value from a form by using below code snippet :
public Document execute(Document origDoc, DocbaseXFormsContext context)
throws AdaptorException {
JXPathContext validateContext = JXPathContext.newContext(origDoc);
DfClientX clientX = new DfClientX();
IDfSession session = null;
try {
session = getSessionFromDocBase();
logger.info("Executing FSSVHD correction processor");
System.out.println("Executing Document Processor.....");
String rootPath = "/Activity/ProcessData/Variables/";
String invoiceDate = validateContext.getPointer(
rootPath + "InvoiceActualDate").getValue().toString();
System.out.println("invoice date = " + invoiceDate);
}
But getting the date as 5:30 hours less then the date and time mentioned in the forms fields at form submission time.
Kindly suggest if i can get the exact same date time value, as mentioned in the form.
Thanks & Regards,
Avdhesh Gaur
Comments
-
Hi Vinod,
Thanks for the response....!!
As we have already make the same time zone settings on content and app
server.
The time zone we are using is US english TZ.
Regards,
Avdhesh Gaur
ECN <https://community.emc.com/?et=watches.email.thread> Getting
05:30 hours difference when fetching date from a form's date field
reply from Vinod
<https://community.emc.com/people/Vinojass?et=watches.email.thread> in
Documentum - View the full discussion
<https://community.emc.com/message/896466?et=watches.email.thread#896466>
0 -
Hi Vinod,
That is not working. As i am checking in my UAT environment, facing the
same issue. Although using the same machine as client and server.
Regards,
Avdhesh Gaur
0 -
I don't know how dates are stored in form fields, but my guess is:
- Forms uses DFC to store date
- DFC converts local time to UTC
- Forms stores UTC date
- You're reading the stored UTC date from the XML, so you need to convert to your local time zone.
0 -
Hi Alvaro,
The date is getting stored in form field as local time, but when we are fetching the date by using DFC code, it converts the time to UTC and reflecting 05:30 hours difference..
So now i think, we need to convert the UTC date to our local date by using some DFC code.
Kindly suggest, if this seems the good process to handle the same.
Regards,
Avdhesh Gaur
0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 104 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management