...
|
...
|
@@ -11,6 +11,10 @@ public final class DateUtils { |
|
|
public final static String DEFAULT_FOMARTPATTER="yyyy-MM-dd HH:mm:ss";
|
|
|
|
|
|
public final static String DAY_FOMARTPATTER="yyyy-MM-dd";
|
|
|
|
|
|
public final static String ACTIVITY_DAY_FOMARTPATTER="yyyy/MM/dd HH:mm";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -146,4 +150,15 @@ public final class DateUtils { |
|
|
public static void main(String[] args) {
|
|
|
System.out.println(getTodayZero());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 将数据库中的UNIX_Time(该时间是距离1970年的秒数,在转换过程中先要换算成毫秒)转换成UTC时间
|
|
|
* @param time
|
|
|
* @return
|
|
|
*/
|
|
|
public static String getActivityDateString(int time)
|
|
|
{
|
|
|
SimpleDateFormat sdf=new SimpleDateFormat(ACTIVITY_DAY_FOMARTPATTER);
|
|
|
return sdf.format(new Date((long)time*1000));
|
|
|
}
|
|
|
} |
...
|
...
|
|