简单生成标准日期格式字符串:
String localtime = String.format("%1$s %2$tY-%2$tm-%2$td %2$tT", "Due Date; ", new Date());
结果:Due Date; 2017-07-03 12:41:32