How does the antd date component get the value of minutes and seconds of the year, month, day, and day, similar to '2018-11-13 15 59? 00'.

problem description

how does the antd date component get the value of the hour and second of the year, month, day, and second, similar to "2018-11-13 15 5900"

the environmental background of the problems and what methods you have tried

used format, "YYYY-MM-DD", moment, and now the time seems to be wrong, a few hours short, and the format is not correct

related codes

/ / Please paste the code text below (do not replace the code with pictures)

<DatePicker
  format="YYYY-MM-DD HH:mm:ss"
  showTime
  value={moment(processParams.startTime)}
  onChange={(val) => {
    onUpdateCompensateProcessParams("startTime", moment(val))
  }}
/>

the current result is as follows: ask for advice
clipboard.png

what result do you expect? What is the error message actually seen?

I hope you can give me an example of when I can get the correct format. Thank you

The time of

antd is all handled by moment . See the relevant settings of moment .


moment(val).format("YYYY-MM-DD HH:mm:ss")
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9b25d-182e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9b25d-182e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?