内蒙古网站建设信息,科技创新绘画作品图片,网站建设php的心得和体会,erp系统怎么自学前端传一个时间戳#xff0c;后端解析的时候
就是这么简单的几句代码。这个值输出的值居然是1970#xff0c;应该是20081104#xff0c; 但是为什么返回的是1970了
后面想想发现是时间戳不对
postman请求 修改后的代码 queryBarnSwallowDto.getGraduateDate()替换成自己的…
前端传一个时间戳后端解析的时候
就是这么简单的几句代码。这个值输出的值居然是1970应该是20081104 但是为什么返回的是1970了
后面想想发现是时间戳不对
postman请求 修改后的代码 queryBarnSwallowDto.getGraduateDate()替换成自己的时间字段 SimpleDateFormat simpleDateFormat new SimpleDateFormat(yyyyMMdd);long lt new Long(Long.valueOf(queryBarnSwallowDto.getGraduateDate()) * 1000L);Date date new Date(lt);String format simpleDateFormat.format(date);