# toEpochMilli method

int toEpochMilli()

Gets the milliseconds since the Unix epoch (January 1, 1970 UTC).

Example:

    final zoned = ZonedDateTime.now();
    final epochMillis = zoned.toEpochMilli();

    // Can be used to recreate the same instant
    final recreated = ZonedDateTime.fromEpochMilli(epochMillis, zoned.zone);
    print(zoned == recreated); // true

## Implementation

    int toEpochMilli() {
      return toDateTime().millisecondsSinceEpoch;
    }