📜  颤动日期时间到时间戳 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:02.489000             🧑  作者: Mango

代码示例1
DateTime currentPhoneDate = DateTime.now(); //DateTime

Timestamp myTimeStamp = Timestamp.fromDate(currentPhoneDate); //To TimeStamp

DateTime myDateTime = myTimeStamp.toDate(); // TimeStamp to DateTime

print("current phone data is: $currentPhoneDate");
print("current phone data is: $myDateTime");