Public Member Functions | Public Attributes | Static Private Attributes | List of all members
google.protobuf.internal.well_known_types.Timestamp Class Reference
Inheritance diagram for google.protobuf.internal.well_known_types.Timestamp:
Inheritance graph
[legend]

Public Member Functions

def FromDatetime (self, dt)
 
def FromDatetime (self, dt)
 
def FromJsonString (self, value)
 
def FromJsonString (self, value)
 
def FromMicroseconds (self, micros)
 
def FromMicroseconds (self, micros)
 
def FromMilliseconds (self, millis)
 
def FromMilliseconds (self, millis)
 
def FromNanoseconds (self, nanos)
 
def FromNanoseconds (self, nanos)
 
def FromSeconds (self, seconds)
 
def FromSeconds (self, seconds)
 
def GetCurrentTime (self)
 
def GetCurrentTime (self)
 
def ToDatetime (self)
 
def ToDatetime (self)
 
def ToJsonString (self)
 
def ToJsonString (self)
 
def ToMicroseconds (self)
 
def ToMicroseconds (self)
 
def ToMilliseconds (self)
 
def ToMilliseconds (self)
 
def ToNanoseconds (self)
 
def ToNanoseconds (self)
 
def ToSeconds (self)
 
def ToSeconds (self)
 

Public Attributes

 nanos
 
 seconds
 

Static Private Attributes

tuple __slots__ = ()
 

Detailed Description

Class for Timestamp message type.

Definition at line 102 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

Member Function Documentation

◆ FromDatetime() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.FromDatetime (   self,
  dt 
)
Converts datetime to Timestamp.

Definition at line 240 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromDatetime() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.FromDatetime (   self,
  dt 
)
Converts datetime to Timestamp.

Definition at line 241 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromJsonString() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.FromJsonString (   self,
  value 
)
Parse a RFC 3339 date string format to Timestamp.

Args:
  value: A date string. Any fractional digits (or none) and any offset are
  accepted as long as they fit into nano-seconds precision.
  Example of accepted format: '1972-01-01T10:00:20.021-05:00'

Raises:
  ValueError: On parsing problems.

Definition at line 128 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromJsonString() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.FromJsonString (   self,
  value 
)
Parse a RFC 3339 date string format to Timestamp.

Args:
  value: A date string. Any fractional digits (or none) and any offset are
  accepted as long as they fit into nano-seconds precision.
  Example of accepted format: '1972-01-01T10:00:20.021-05:00'

Raises:
  ValueError: On parsing problems.

Definition at line 135 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromMicroseconds() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.FromMicroseconds (   self,
  micros 
)
Converts microseconds since epoch to Timestamp.

Definition at line 219 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromMicroseconds() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.FromMicroseconds (   self,
  micros 
)
Converts microseconds since epoch to Timestamp.

Definition at line 220 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromMilliseconds() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.FromMilliseconds (   self,
  millis 
)
Converts milliseconds since epoch to Timestamp.

Definition at line 224 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromMilliseconds() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.FromMilliseconds (   self,
  millis 
)
Converts milliseconds since epoch to Timestamp.

Definition at line 225 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromNanoseconds() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.FromNanoseconds (   self,
  nanos 
)
Converts nanoseconds since epoch to Timestamp.

Definition at line 214 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromNanoseconds() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.FromNanoseconds (   self,
  nanos 
)
Converts nanoseconds since epoch to Timestamp.

Definition at line 215 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromSeconds() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.FromSeconds (   self,
  seconds 
)
Converts seconds since epoch to Timestamp.

Definition at line 229 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ FromSeconds() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.FromSeconds (   self,
  seconds 
)
Converts seconds since epoch to Timestamp.

Definition at line 230 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ GetCurrentTime() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.GetCurrentTime (   self)
Get the current UTC into Timestamp.

Definition at line 192 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ GetCurrentTime() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.GetCurrentTime (   self)
Get the current UTC into Timestamp.

Definition at line 193 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToDatetime() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.ToDatetime (   self)
Converts Timestamp to datetime.

Definition at line 234 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToDatetime() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.ToDatetime (   self)
Converts Timestamp to datetime.

Definition at line 235 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToJsonString() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.ToJsonString (   self)
Converts Timestamp to RFC 3339 date string format.

Returns:
  A string converted from timestamp. The string is always Z-normalized
  and uses 3, 6 or 9 fractional digits as required to represent the
  exact time. Example of the return format: '1972-01-01T10:00:20.021Z'

Definition at line 100 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToJsonString() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.ToJsonString (   self)
Converts Timestamp to RFC 3339 date string format.

Returns:
  A string converted from timestamp. The string is always Z-normalized
  and uses 3, 6 or 9 fractional digits as required to represent the
  exact time. Example of the return format: '1972-01-01T10:00:20.021Z'

Definition at line 107 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToMicroseconds() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.ToMicroseconds (   self)
Converts Timestamp to microseconds since epoch.

Definition at line 200 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToMicroseconds() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.ToMicroseconds (   self)
Converts Timestamp to microseconds since epoch.

Definition at line 201 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToMilliseconds() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.ToMilliseconds (   self)
Converts Timestamp to milliseconds since epoch.

Definition at line 205 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToMilliseconds() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.ToMilliseconds (   self)
Converts Timestamp to milliseconds since epoch.

Definition at line 206 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToNanoseconds() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.ToNanoseconds (   self)
Converts Timestamp to nanoseconds since epoch.

Definition at line 196 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToNanoseconds() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.ToNanoseconds (   self)
Converts Timestamp to nanoseconds since epoch.

Definition at line 197 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToSeconds() [1/2]

def google.protobuf.internal.well_known_types.Timestamp.ToSeconds (   self)
Converts Timestamp to seconds since epoch.

Definition at line 210 of file protobuf/python/google/protobuf/internal/well_known_types.py.

◆ ToSeconds() [2/2]

def google.protobuf.internal.well_known_types.Timestamp.ToSeconds (   self)
Converts Timestamp to seconds since epoch.

Definition at line 211 of file bloaty/third_party/protobuf/python/google/protobuf/internal/well_known_types.py.

Member Data Documentation

◆ __slots__

tuple Timestamp.__slots__ = ()
staticprivate

◆ nanos

google.protobuf.internal.well_known_types.Timestamp.nanos

◆ seconds

google.protobuf.internal.well_known_types.Timestamp.seconds

The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:27