Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 java 中将 UNIX 时间戳转换为 XMLGregorianCalendar 值?
时间戳:1379487623
long time = 1379487623; Date date = new Date((long)time*1000); GregorianCalendar c = new GregorianCalendar(); c.setTime(date); XMLGregorianCalendar date2 = DatatypeFactory.newInstance().newXMLGregorianCalendar(c);