Closed zsq1234 closed 11 months ago
The next version will be added. Currently, you can use ParseByLayout
method
carbon.ParseByLayout("2023-11-08T09:52:48", "2006-01-02T15:04:05")
In addition, you can replace
carbon.Parse(v.(string)).ToStdTime().UnixMilli()
with
carbon.Parse(v.(string)).TimestampMilli()
thank you, i will try it.
i now meet question again, "2023-11-18T03:55:27.000+0000" and i do just like this, but get 0, how can i do with it?
The next version will be added. Currently, you can use
ParseByLayout
methodcarbon.ParseByLayout("2023-11-08T09:52:48", "2006-01-02T15:04:05")
-0700
is a fixed format
carbon.ParseByLayout("2023-11-18T03:55:27.000+0000", "2006-01-02T15:04:05.999-0700").TimestampMilli() // 1700279727000
Thank you, this solved my problem
use:carbon.Parse(v).ToStdTime().UnixMilli() v is "2023-11-08T09:52:48" but get value 18446681938112751616
i find the
layouts
not contain this format, why or can support it?very thank you