package com.unicom import java.text.SimpleDateFormat import java.util.Date /** * Created by Administrator on 2016/10/21. */ object TimeUtils { val now = new Date() def getCurrent_time(): Long = { val a = now.getTime var str = a+"" str.substring(0,10).toLong } def getZero_time():Long={ val dateFormat = new SimpleDateFormat("yyyy-MM-dd") val a = dateFormat.parse(dateFormat.format(now)).getTime var str = a+"" str.substring(0,10).toLong } }