Author: ashish
Date: Mon Sep 21 12:07:51 2009
New Revision: 817217
URL:
http://svn.apache.org/viewvc?rev=817217&view=revLog:
Display date that we prefer in OFBiz instead of showing eBay date format.
Modified:
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java
Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java?rev=817217&r1=817216&r2=817217&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java (original)
+++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java Mon Sep 21 12:07:51 2009
@@ -408,7 +408,11 @@
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 @@
Map<String, Object> 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);