serverTimestamp static method

FieldValue serverTimestamp()

Creates a FieldValue for setting a server timestamp.

Returns: A FieldValue for server timestamp operation.

Example:

doc.update({'timestamp': FieldValue.serverTimestamp()});

Implementation

static FieldValue serverTimestamp() {
  return FieldValue._('FieldValue:serverTimestamp', 'servertimestamp');
}