timeStampFromDateTime method

Timestamp timeStampFromDateTime(
  1. DateTime dt
)

Implementation

Timestamp timeStampFromDateTime(DateTime dt) {
  final millis = dt.millisecondsSinceEpoch;
  return Timestamp(
      seconds: Int64(millis ~/ 1000), nanos: (millis % 1000) * 1000000);
}