package ballistics.utils

import java.time.LocalDateTime
import java.time.ZoneOffset

fun toDateTime(t: Double) = LocalDateTime.ofEpochSecond(t.toLong(), (t % 1 * 1e9).toInt(), ZoneOffset.UTC)

fun fromDateTime(t: LocalDateTime) = t.toEpochSecond(ZoneOffset.UTC) + t.nano / 1e9
