上图:

代码:

    @Test
        public void test(){
            DateTime time =new DateTime(); //获取当前时间
            int tt =time.getMillisOfDay();
            System.out.println(tt);
        }

注意:转换的只是天的时间戳,没有展示年的。

返回:JAVA中DateTime的用法总结