ITeye博客

CruiseControl构建时格林威治时间改为北京时间

julylin · 2011-09-13 17:47 · CruiseControl · 编程语言 · Markdown

找到net.sourceforge.cruisecontrol.util下的DateUtil类,找到formatIso8601方法,将其改为:

public static String formatIso8601(final Date date) { if (date == null) { return null; } return createIso8601SimpleFormat().format(date); }

然后添加createIso8601SimpleFormat方法:

private static DateFormat createIso8601SimpleFormat() { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); }

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。