fromEpochSeconds

fun fromEpochSeconds(epochSeconds: Long, nanosecondAdjustment: Int): RealmInstant

Creates a RealmInstant that is the epochSeconds number of seconds from the UNIX epoch 1970-01-01T00:00:00Z and the nanosecondAdjustment number of nanoseconds from the whole second.

All timestamps after the epoch consist of positive numbers and all timestamps before the epoch consists of the negative numbers.

If nanosecondAdjustment is bigger than 999_999_999 or smaller than -999_999_999, the value will increment or decrement epochSeconds accordingly until nanosecondsOfSecond is within the valid range.

If the timestamp exceed the maximal bounds of epochSeconds, the Timestamp will clamp to either MIN or MAX.