将配置转换时间的时区设置由写死改成提到配置文件中
This commit is contained in:
@@ -255,7 +255,7 @@ public abstract class BaseService {
|
||||
public JsonElement serialize(Date src, Type type,
|
||||
JsonSerializationContext context) {
|
||||
String format = "yyyy-MM-dd'T'HH:mm:ss.SSS";
|
||||
long time= ((Date) src).getTime()-8*60*60*1000;
|
||||
long time= ((Date) src).getTime()-Constants.TIME_ZONE*60*60*1000;
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||
return new JsonPrimitive(sdf.format(time));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user