fix app timezone

master
luoyang 6 years ago
parent 8fb39f1f8c
commit 2dbd4e9443

@ -805,6 +805,9 @@ public class RetailAppServiceImp implements RetailAppService {
ArrayList<String> date_contains = new ArrayList<>();
for (JSONObject order : orders) {
Calendar calendar = (Calendar) order.get("transaction_time");
if (timezone != null) {
calendar.setTimeZone(TimeZone.getTimeZone(timezone));
}
String trade_date = DateFormatUtils.format(calendar, "yyyy-MM-dd", calendar.getTimeZone());
String trade_time = DateFormatUtils.format(calendar, "HH:mm:ss", calendar.getTimeZone());
order.put("trade_date", trade_date);

Loading…
Cancel
Save