| | |
| | | } |
| | | |
| | | public Map<String, Object> bulidOne(ContractOrder order) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a", Locale.ENGLISH); |
| | | simpleDateFormat.setTimeZone(TimeZone.getTimeZone("America/New_York")); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | simpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | DecimalFormat df = new DecimalFormat("#.##"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("order_no", order.getOrder_no()); |
| | |
| | | } |
| | | DecimalFormat df_symbol = new DecimalFormat(decimals); |
| | | df_symbol.setRoundingMode(RoundingMode.FLOOR);// 向下取整 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss a", Locale.ENGLISH); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("America/New_York")); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | DecimalFormat df = new DecimalFormat("#.##"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("order_no", order.getOrder_no()); |
| | |
| | | |
| | | DecimalFormat df_symbol = new DecimalFormat(decimals); |
| | | df_symbol.setRoundingMode(RoundingMode.FLOOR);// 向下取整 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss a", Locale.ENGLISH); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("America/New_York")); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | DecimalFormat df = new DecimalFormat("#.##"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("order_no", order.getOrder_no()); |
| | |
| | | package project.web.api; |
| | | |
| | | import java.net.URLDecoder; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | content = Constants.WEB_URL + "/public/showimg!showImg.action?imagePath=" + content; |
| | | } |
| | | map.put("content", content); |
| | | map.put("createtime", DateUtils.format(list.get(i).getCreateTime(), "MM-dd HH:mm")); |
| | | // map.put("createtime", DateUtils.format(list.get(i).getCreateTime(), "MM-dd HH:mm")); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | map.put("createtime", sdf.format(list.get(i).getCreateTime())); |
| | | map.put("delete_status", list.get(i).getDelete_status()); |
| | | data.add(map); |
| | | } |
| | |
| | | map.put("ts", realtime.getTs()); |
| | | String currentTime = realtime.getCurrent_time(); |
| | | // 设置时区为纽约的冬令时(Eastern Standard Time, EST) |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("America/New_York")); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | Date parsedDate = sdf.parse(currentTime); |
| | | map.put("current_time",sdf.format(parsedDate)); |
| | | map.put("name", realtime.getName()); |