getTimeOffset

fun getTimeOffset(time: <Error class: unknown class>?, offset: Double): <Error class: unknown class>?

A utility method that returns a date offset by the offset time passed in as a parameter. This method casts the offset as a long and calls getTimeOffset.

Return

the Datewith the offset added to it

Parameters

time

the start time

offset

the offset in milliseconds to add to the time


fun getTimeOffset(time: <Error class: unknown class>?, offset: Long): <Error class: unknown class>?

A utility method that returns a date offset by the offset time passed in. Please note that the level of light during twilight is not affected by elevation, so if this is being used to calculate an offset before sunrise or after sunset with the intent of getting a rough "level of light" calculation, the sunrise or sunset time passed to this method should be sea level sunrise and sunset.

Return

the Date with the offset in milliseconds added to it, or null if time is null or offset is Long.MIN_VALUE

Parameters

time

the start time

offset

the offset in milliseconds to add to the time.