Companion

object Companion

Functions

Link copied to clipboard

Converts Instant to a PubNub timetoken

Link copied to clipboard
fun localDateTimeToInstant(localDateTime: LocalDateTime, timeZone: TimeZone): Instant

Converts LocalDateTime in the provided TimeZone into a PubNub Instant.

Link copied to clipboard
fun localDateTimeToTimetoken(localDateTime: LocalDateTime, timeZone: TimeZone): Long

Converts LocalDateTime in the provided TimeZone directly to a PubNub timetoken.

Link copied to clipboard

Converts a PubNub timetoken (a unique identifier for each message sent and received in a PubNub channel that is a number of 100-nanosecond intervals since January 1, 1970) to LocalDateTime object representing the corresponding moment in time.

Link copied to clipboard
fun timetokenToUnix(timetoken: Long): Long

Converts a PubNub timetoken to a Unix timestamp (in millis).

Link copied to clipboard
fun unixToTimetoken(unixTime: Long): Long

Converts a Unix timestamp (in millis) to a PubNub timetoken