From 152a2ea426d91303ceb8ed65ee91fc4c232f0e41 Mon Sep 17 00:00:00 2001 From: Ashish Vijaywargiya Date: Mon, 21 Sep 2009 12:07:51 +0000 Subject: [PATCH] Display date that we prefer in OFBiz instead of showing eBay date format. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@817217 13f79535-47bb-0310-9956-ffa450edef68 --- .../ebay/src/org/ofbiz/ebay/EbayOrderServices.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java b/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java index 74d44e4b3a..446a7d2244 100644 --- a/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java +++ b/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java @@ -408,7 +408,11 @@ public class EbayOrderServices { orderCtx.put("externalId", externalOrderId); orderCtx.put("amountPaid", UtilXml.childElementValue(ordersElement, "Total", "0")); - orderCtx.put("createdDate", UtilXml.childElementValue(ordersElement, "CreatedTime")); + String createdDate = UtilXml.childElementValue(ordersElement, "CreatedTime"); + if (UtilValidate.isNotEmpty(createdDate)) { + createdDate = EbayHelper.convertDate(createdDate, "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", "yyyy-MM-dd HH:mm:ss.SSS"); + orderCtx.put("createdDate", createdDate); + } orderCtx.put("paidTime", UtilXml.childElementValue(ordersElement, "PaidTime")); orderCtx.put("shippedTime", UtilXml.childElementValue(ordersElement, "ShippedTime")); orderCtx.put("ebayUserIdBuyer", UtilXml.childElementValue(ordersElement, "BuyerUserID")); @@ -609,7 +613,11 @@ public class EbayOrderServices { Map orderCtx = FastMap.newInstance(); orderCtx.put("amountPaid", UtilXml.childElementValue(transactionElement, "AmountPaid", "0")); - orderCtx.put("createdDate", UtilXml.childElementValue(transactionElement, "CreatedDate")); + String createdDate = UtilXml.childElementValue(transactionElement, "CreatedDate"); + if (UtilValidate.isNotEmpty(createdDate)) { + createdDate = EbayHelper.convertDate(createdDate, "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", "yyyy-MM-dd HH:mm:ss.SSS"); + orderCtx.put("createdDate", createdDate); + } orderCtx.put("paidTime", UtilXml.childElementValue(transactionElement, "PaidTime")); orderCtx.put("shippedTime", UtilXml.childElementValue(transactionElement, "ShippedTime")); orderCtx.put("productStoreId", productStoreId);