# Class Timestamp (3.19.4)

    public final class Timestamp extends GeneratedMessageLite<Timestamp,Timestamp.Builder> implements TimestampOrBuilder

A Timestamp represents a point in time independent of any time zone or local
calendar, encoded as a count of seconds and fractions of seconds at
nanosecond resolution. The count is relative to an epoch at UTC midnight on
January 1, 1970, in the proleptic Gregorian calendar which extends the
Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
second table is needed for interpretation, using a [24-hour linear
smear](https://developers.google.com/time/smear).
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
restricting to that range, we ensure that we can convert to and from [RFC
3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.

# Examples

Example 1: Compute Timestamp from POSIX `time()`.
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX `gettimeofday()`.
struct timeval tv;
gettimeofday(\&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec \* 1000);
Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
FILETIME ft;
GetSystemTimeAsFileTime(\&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) \<\< 32) \| ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) \* 100));
Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) \* 1000000)).build();
Example 5: Compute Timestamp from Java `Instant.now()`.
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()

# JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
format is "{year}-{month}-{day}T{hour}:{min}:{sec}\[.{frac_sec}\]Z"
where {year} is always expressed using four digits while {month}, {day},
{hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
is required. A proto3 JSON serializer should always use UTC (as indicated by
"Z") when printing the Timestamp type and a proto3 JSON parser should be
able to accept both UTC and other timezones (as indicated by an offset).
For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
[toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
method. In Python, a standard `datetime.datetime` object can be converted
to this format using
[`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
the Joda Time's [`ISODateTimeFormat.dateTime()`](http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D) to obtain a formatter capable of generating timestamps in this format.

Protobuf type `google.protobuf.Timestamp`

## Inheritance

[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [AbstractMessageLite\<MessageType,BuilderType\>](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite) \> [GeneratedMessageLite](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite) \> Timestamp

## Implements

[TimestampOrBuilder](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder)

## Inherited Members

[AbstractMessageLite.\<T\>addAll(Iterable\<T\>,Collection\<? super T\>)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite#com_google_protobuf_AbstractMessageLite__T_addAll_java_lang_Iterable_T__java_util_Collection___super_T__) [AbstractMessageLite.\<T\>addAll(Iterable\<T\>,List\<? super T\>)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite#com_google_protobuf_AbstractMessageLite__T_addAll_java_lang_Iterable_T__java_util_List___super_T__) [AbstractMessageLite.checkByteStringIsUtf8(ByteString)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite#com_google_protobuf_AbstractMessageLite_checkByteStringIsUtf8_com_google_protobuf_ByteString_) [AbstractMessageLite.toByteArray()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite#com_google_protobuf_AbstractMessageLite_toByteArray__) [AbstractMessageLite.toByteString()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite#com_google_protobuf_AbstractMessageLite_toByteString__) [AbstractMessageLite.writeDelimitedTo(OutputStream)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite#com_google_protobuf_AbstractMessageLite_writeDelimitedTo_java_io_OutputStream_) [AbstractMessageLite.writeTo(OutputStream)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite#com_google_protobuf_AbstractMessageLite_writeTo_java_io_OutputStream_) [GeneratedMessageLite.\<ContainingType,Type\>newRepeatedGeneratedExtension(ContainingType,MessageLite,Internal.EnumLiteMap\<?\>,int,WireFormat.FieldType,boolean,Class)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__ContainingType_Type_newRepeatedGeneratedExtension_ContainingType_com_google_protobuf_MessageLite_com_google_protobuf_Internal_EnumLiteMap____int_com_google_protobuf_WireFormat_FieldType_boolean_java_lang_Class_) [GeneratedMessageLite.\<ContainingType,Type\>newSingularGeneratedExtension(ContainingType,Type,MessageLite,Internal.EnumLiteMap\<?\>,int,WireFormat.FieldType,Class)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__ContainingType_Type_newSingularGeneratedExtension_ContainingType_Type_com_google_protobuf_MessageLite_com_google_protobuf_Internal_EnumLiteMap____int_com_google_protobuf_WireFormat_FieldType_java_lang_Class_) [GeneratedMessageLite.\<E\>emptyProtobufList()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__E_emptyProtobufList__) [GeneratedMessageLite.\<E\>mutableCopy(Internal.ProtobufList\<E\>)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__E_mutableCopy_com_google_protobuf_Internal_ProtobufList_E__) [GeneratedMessageLite.\<MessageType,BuilderType\>createBuilder()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__MessageType_BuilderType_createBuilder__) [GeneratedMessageLite.\<MessageType,BuilderType\>createBuilder(MessageType)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__MessageType_BuilderType_createBuilder_MessageType_) [GeneratedMessageLite.\<T\>isInitialized(T,boolean)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_isInitialized_T_boolean_) [GeneratedMessageLite.\<T\>parseDelimitedFrom(T,InputStream)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseDelimitedFrom_T_java_io_InputStream_) [GeneratedMessageLite.\<T\>parseDelimitedFrom(T,InputStream,ExtensionRegistryLite)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseDelimitedFrom_T_java_io_InputStream_com_google_protobuf_ExtensionRegistryLite_) [GeneratedMessageLite.\<T\>parseFrom(T,byte\[\])](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseFrom_T_byte___) [GeneratedMessageLite.\<T\>parseFrom(T,byte\[\],ExtensionRegistryLite)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseFrom_T_byte___com_google_protobuf_ExtensionRegistryLite_) [GeneratedMessageLite.\<T\>parseFrom(T,ByteString)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseFrom_T_com_google_protobuf_ByteString_) [GeneratedMessageLite.\<T\>parseFrom(T,ByteString,ExtensionRegistryLite)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseFrom_T_com_google_protobuf_ByteString_com_google_protobuf_ExtensionRegistryLite_) [GeneratedMessageLite.\<T\>parseFrom(T,CodedInputStream)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseFrom_T_com_google_protobuf_CodedInputStream_) [GeneratedMessageLite.\<T\>parseFrom(T,CodedInputStream,ExtensionRegistryLite)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseFrom_T_com_google_protobuf_CodedInputStream_com_google_protobuf_ExtensionRegistryLite_) [GeneratedMessageLite.\<T\>parseFrom(T,InputStream)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseFrom_T_java_io_InputStream_) [GeneratedMessageLite.\<T\>parseFrom(T,InputStream,ExtensionRegistryLite)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseFrom_T_java_io_InputStream_com_google_protobuf_ExtensionRegistryLite_) [GeneratedMessageLite.\<T\>parseFrom(T,ByteBuffer)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseFrom_T_java_nio_ByteBuffer_) [GeneratedMessageLite.\<T\>parseFrom(T,ByteBuffer,ExtensionRegistryLite)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parseFrom_T_java_nio_ByteBuffer_com_google_protobuf_ExtensionRegistryLite_) [GeneratedMessageLite.\<T\>parsePartialFrom(T,CodedInputStream)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_parsePartialFrom_T_com_google_protobuf_CodedInputStream_) [GeneratedMessageLite.\<T\>registerDefaultInstance(Class\<T\>,T)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite__T_registerDefaultInstance_java_lang_Class_T__T_) [GeneratedMessageLite.dynamicMethod(GeneratedMessageLite.MethodToInvoke)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_dynamicMethod_com_google_protobuf_GeneratedMessageLite_MethodToInvoke_) [GeneratedMessageLite.dynamicMethod(GeneratedMessageLite.MethodToInvoke,Object)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_dynamicMethod_com_google_protobuf_GeneratedMessageLite_MethodToInvoke_java_lang_Object_) [GeneratedMessageLite.dynamicMethod(GeneratedMessageLite.MethodToInvoke,Object,Object)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_dynamicMethod_com_google_protobuf_GeneratedMessageLite_MethodToInvoke_java_lang_Object_java_lang_Object_) [GeneratedMessageLite.emptyBooleanList()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_emptyBooleanList__) [GeneratedMessageLite.emptyDoubleList()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_emptyDoubleList__) [GeneratedMessageLite.emptyFloatList()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_emptyFloatList__) [GeneratedMessageLite.emptyIntList()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_emptyIntList__) [GeneratedMessageLite.emptyLongList()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_emptyLongList__) [GeneratedMessageLite.equals(Object)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_equals_java_lang_Object_) [GeneratedMessageLite.getDefaultInstanceForType()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_getDefaultInstanceForType__) [GeneratedMessageLite.getParserForType()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_getParserForType__) [GeneratedMessageLite.getSerializedSize()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_getSerializedSize__) [GeneratedMessageLite.hashCode()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_hashCode__) [GeneratedMessageLite.isInitialized()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_isInitialized__) [GeneratedMessageLite.makeImmutable()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_makeImmutable__) [GeneratedMessageLite.mergeLengthDelimitedField(int,ByteString)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_mergeLengthDelimitedField_int_com_google_protobuf_ByteString_) [GeneratedMessageLite.mergeUnknownFields(UnknownFieldSetLite)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_mergeUnknownFields_com_google_protobuf_UnknownFieldSetLite_) [GeneratedMessageLite.mergeVarintField(int,int)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_mergeVarintField_int_int_) [GeneratedMessageLite.mutableCopy(Internal.BooleanList)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_mutableCopy_com_google_protobuf_Internal_BooleanList_) [GeneratedMessageLite.mutableCopy(Internal.DoubleList)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_mutableCopy_com_google_protobuf_Internal_DoubleList_) [GeneratedMessageLite.mutableCopy(Internal.FloatList)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_mutableCopy_com_google_protobuf_Internal_FloatList_) [GeneratedMessageLite.mutableCopy(Internal.IntList)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_mutableCopy_com_google_protobuf_Internal_IntList_) [GeneratedMessageLite.mutableCopy(Internal.LongList)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_mutableCopy_com_google_protobuf_Internal_LongList_) [GeneratedMessageLite.newBuilderForType()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_newBuilderForType__) [GeneratedMessageLite.newMessageInfo(MessageLite,String,Object\[\])](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_newMessageInfo_com_google_protobuf_MessageLite_java_lang_String_java_lang_Object___) [GeneratedMessageLite.parseUnknownField(int,CodedInputStream)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_parseUnknownField_int_com_google_protobuf_CodedInputStream_) [GeneratedMessageLite.toBuilder()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_toBuilder__) [GeneratedMessageLite.toString()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_toString__) [GeneratedMessageLite.writeTo(CodedOutputStream)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_writeTo_com_google_protobuf_CodedOutputStream_) [Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Fields

### NANOS_FIELD_NUMBER

    public static final int NANOS_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### SECONDS_FIELD_NUMBER

    public static final int SECONDS_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

## Static Methods

### getDefaultInstance()

    public static Timestamp getDefaultInstance()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

### newBuilder()

    public static Timestamp.Builder newBuilder()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.Builder` |   |

### newBuilder(Timestamp prototype)

    public static Timestamp.Builder newBuilder(Timestamp prototype)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `prototype` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.Builder` |   |

### parseDelimitedFrom(InputStream input)

    public static Timestamp parseDelimitedFrom(InputStream input)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

    public static Timestamp parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html` |
| `extensionRegistry` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseFrom(byte\[\] data)

    public static Timestamp parseFrom(byte[] data)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException` |   |

### parseFrom(byte\[\] data, ExtensionRegistryLite extensionRegistry)

    public static Timestamp parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` |
| `extensionRegistry` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException` |   |

### parseFrom(ByteString data)

    public static Timestamp parseFrom(ByteString data)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException` |   |

### parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

    public static Timestamp parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString` |
| `extensionRegistry` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException` |   |

### parseFrom(CodedInputStream input)

    public static Timestamp parseFrom(CodedInputStream input)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.CodedInputStream` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

    public static Timestamp parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.CodedInputStream` |
| `extensionRegistry` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseFrom(InputStream input)

    public static Timestamp parseFrom(InputStream input)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

    public static Timestamp parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html` |
| `extensionRegistry` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseFrom(ByteBuffer data)

    public static Timestamp parseFrom(ByteBuffer data)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException` |   |

### parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

    public static Timestamp parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html` |
| `extensionRegistry` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException` |   |

### parser()

    public static Parser<Timestamp> parser()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Parser<https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp>` |   |

## Methods

### dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)

    protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)

A method that implements different types of operations described in MethodToInvoke.
These different kinds of operations are required to implement message-level operations for
builders in the runtime. This method bundles those operations to reduce the generated methods
count.

- `NEW_INSTANCE` returns a new instance of the protocol buffer that has not yet been made immutable. See `MAKE_IMMUTABLE`.
- `IS_INITIALIZED` returns `null` for false and the default instance for true. It doesn't use or modify any memoized value.
- `GET_MEMOIZED_IS_INITIALIZED` returns the memoized `isInitialized` byte value.
- `SET_MEMOIZED_IS_INITIALIZED` sets the memoized `isInitialized` byte value to 1 if the first parameter is not null, or to 0 if the first parameter is null.
- `NEW_BUILDER` returns a `BuilderType` instance.

This method, plus the implementation of the Builder, enables the Builder class to be proguarded
away entirely on Android.

For use by generated code only.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `method` | `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite.MethodToInvoke` |
| `arg0` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |
| `arg1` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |   |

**Overrides** [GeneratedMessageLite\<MessageType,BuilderType\>.dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessageLite#com_google_protobuf_GeneratedMessageLite_dynamicMethod_com_google_protobuf_GeneratedMessageLite_MethodToInvoke_java_lang_Object_java_lang_Object_)

### getNanos()

    public int getNanos()

Non-negative fractions of a second at nanosecond resolution. Negative
second values with fractions must still have non-negative nanos values
that count forward in time. Must be from 0 to 999,999,999
inclusive.

`int32 nanos = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The nanos. |

### getSeconds()

    public long getSeconds()

Represents seconds of UTC time since Unix epoch
1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
9999-12-31T23:59:59Z inclusive.

`int64 seconds = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The seconds. |