Initializerswift-protobuf 1.28.1SwiftProtobuf
init(timeIntervalSinceReferenceDate:)
Creates a new Google_Protobuf_Timestamp
initialized relative to 00:00:00 UTC on 1 January 2001 by a given number of seconds.
init(timeIntervalSinceReferenceDate: TimeInterval)
Parameters
- timeIntervalSinceReferenceDate
The
TimeInterval
, interpreted as seconds relative to 00:00:00 UTC on 1 January 2001.
Other members in extension
Type members
init(
) init(date: Date
) Creates a new
Google_Protobuf_Timestamp
initialized to the same time as the givenDate
.init(seconds: Int64, nanos: Int32
) Creates a new
Google_Protobuf_Timestamp
equal to the given number of seconds and nanoseconds.init(timeIntervalSince1970: TimeInterval
) Creates a new
Google_Protobuf_Timestamp
initialized relative to 00:00:00 UTC on 1 January 1970 by a given number of seconds.static let protoMessageName: String
static func == (lhs: Google_Protobuf_Timestamp, rhs: Google_Protobuf_Timestamp
) -> Bool
Show implementation details (1)
Hide implementation details
Instance members
var date: Date
A
Date
initialized to the same time as the timestamp.var nanos: Int32
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.
var seconds: Int64
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.
var timeIntervalSince1970: TimeInterval
The interval between the timestamp and 00:00:00 UTC on 1 January 1970.
var timeIntervalSinceReferenceDate: TimeInterval
The interval between the timestamp and 00:00:00 UTC on 1 January 2001.
var unknownFields: UnknownStorage
func decodeMessage<D>(decoder: inout D
) throws func traverse<V>(visitor: inout V
) throws