microsecondsSinceEpoch property

int microsecondsSinceEpoch

The number of microseconds since the 'Unix epoch' 1970-01-01T00:00:00Z (UTC).

This value is independent of the time zone.

This value is at most 8,640,000,000,000,000,000us (100,000,000 days) from the Unix epoch. In other words: microsecondsSinceEpoch.abs() <= 8640000000000000000.

Note that this value does not fit into 53 bits (the size of a IEEE double). A JavaScript number is not able to hold this value.

Implementation

int get microsecondsSinceEpoch => _microsecondsSinceEpoch;
void microsecondsSinceEpoch=(int microsecondsSinceEpoch)

The number of microseconds since the 'Unix epoch' 1970-01-01T00:00:00Z (UTC).

This value is independent of the time zone.

This value is at most 8,640,000,000,000,000,000us (100,000,000 days) from the Unix epoch. In other words: microsecondsSinceEpoch.abs() <= 8640000000000000000.

Note that this value does not fit into 53 bits (the size of a IEEE double). A JavaScript number is not able to hold this value.

Implementation

set microsecondsSinceEpoch(int microsecondsSinceEpoch) {
  if (microsecondsSinceEpoch.abs() <= 8640000000000000000) {
    _internal(DateTime.fromMicrosecondsSinceEpoch(microsecondsSinceEpoch));
  }
}