GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTSTimestamp
Object representing a timestamp.
-
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.
Declaration
Swift
var seconds: Int64 { get }
Objective-C
@property (nonatomic, readonly) int64_t seconds;
-
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.
Declaration
Swift
var nanos: Int32 { get }
Objective-C
@property (nonatomic, readonly) int32_t nanos;
-
Instantiates the object with the specified seconds
and `nanos’.
Declaration
Swift
init!(seconds: Int64, nanos: Int32)
Objective-C
- (instancetype)initWithSeconds:(int64_t)seconds nanos:(int32_t)nanos;
-
Declaration
Objective-C
- (instancetype)init;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMTSTimestamp\u003c/code\u003e represents a timestamp, encompassing both seconds and nanoseconds for precise time representation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eseconds\u003c/code\u003e property denotes the UTC time in seconds since the Unix epoch, ranging from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003enanos\u003c/code\u003e property specifies non-negative fractions of a second at nanosecond resolution, with a value between 0 and 999,999,999.\u003c/p\u003e\n"],["\u003cp\u003eThe object should be instantiated using the \u003ccode\u003e-initWithSeconds:nanos:\u003c/code\u003e method, which accepts the \u003ccode\u003eseconds\u003c/code\u003e and \u003ccode\u003enanos\u003c/code\u003e values, and it is unavailable to use \u003ccode\u003e-init\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `GMTSTimestamp` object represents a timestamp using seconds and nanoseconds. It stores the seconds since the Unix epoch (1970-01-01T00:00:00Z), with a valid range from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z. The `nanos` property holds non-negative fractions of a second, from 0 to 999,999,999. The object can be initialized using `initWithSeconds:nanos:`, while the `init` method is unavailable. Accessing both values is read only.\n"],null,["# GoogleRidesharingConsumer Framework Reference\n\nGMTSTimestamp\n=============\n\n @interface GMTSTimestamp : ../Classes/GMTCImmutableData.html\n\nObject representing a timestamp.\n- `\n ``\n ``\n `\n\n ### [seconds](#/c:objc(cs)GMTSTimestamp(py)seconds)\n\n `\n ` \n Represents seconds of UTC time since Unix epoch\n 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n 9999-12-31T23:59:59Z inclusive. \n\n #### Declaration\n\n Swift \n\n var seconds: Int64 { get }\n\n Objective-C \n\n @property (nonatomic, readonly) int64_t seconds;\n\n- `\n ``\n ``\n `\n\n ### [nanos](#/c:objc(cs)GMTSTimestamp(py)nanos)\n\n `\n ` \n Non-negative fractions of a second at nanosecond resolution. Negative\n second values with fractions must still have non-negative nanos values\n that count forward in time. Must be from 0 to 999,999,999\n inclusive. \n\n #### Declaration\n\n Swift \n\n var nanos: Int32 { get }\n\n Objective-C \n\n @property (nonatomic, readonly) int32_t nanos;\n\n- `\n ``\n ``\n `\n\n ### [-initWithSeconds:nanos:](#/c:objc(cs)GMTSTimestamp(im)initWithSeconds:nanos:)\n\n `\n ` \n Instantiates the object with the specified [seconds](../Classes/GMTSTimestamp.html#/c:objc(cs)GMTSTimestamp(py)seconds) and \\`nanos'. \n\n #### Declaration\n\n Swift \n\n init!(seconds: Int64, nanos: Int32)\n\n Objective-C \n\n - (instancetype)initWithSeconds:(int64_t)seconds nanos:(int32_t)nanos;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMTSTimestamp(im)init)\n\n `\n ` \n Unavailable \n Use [-initWithSeconds:nanos:](../Classes/GMTSTimestamp.html#/c:objc(cs)GMTSTimestamp(im)initWithSeconds:nanos:) instead. \n\n #### Declaration\n\n Objective-C \n\n - (instancetype)init;"]]