小编Ahm*_*met的帖子

SimpleDateFormat 表示还有 2 小时

我有这个代码,但它还需要 2 个小时

  val leftTimeInMillis = 12728918
  val mTimeFormat = SimpleDateFormat("HH:mm:ss", Locale.ROOT)
  binding.textTimeLeft.text = mTimeFormat.format(leftTimeInMillis)
Run Code Online (Sandbox Code Playgroud)

通常文本必须指示 03:32:08 但它是 05:32:08

android time-format milliseconds simpledateformat kotlin

2
推荐指数
1
解决办法
324
查看次数