The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/firestore > / > Timestamp > fromMillis

Timestamp.fromMillis() method

Creates a new timestamp from the given number of milliseconds.

Signature:

static fromMillis(milliseconds: number): Timestamp;

Parameters

Parameter Type Description
milliseconds number Number of milliseconds since Unix epoch 1970-01-01T00:00:00Z.

Returns:

Timestamp

A new Timestamp representing the same point in time as the given number of milliseconds.