记录一下开发项目中遇到的坑:
val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
val time: Long = simpleDateFormat.parse(date).time
//yyyy-MM-dd hh:mm:ss 格式化后获取到的时间戳是12小时制
//yyyy-MM-dd HH:mm:ss 格式化后获取到的时间戳是24小时制
val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
val time: Long = simpleDateFormat.parse(date).time
//yyyy-MM-dd hh:mm:ss 格式化后获取到的时间戳是12小时制
//yyyy-MM-dd HH:mm:ss 格式化后获取到的时间戳是24小时制