def rmGetSunriseTimestampForDayTimestamp(ts, lat, lon, elevation):
    if lat is None or lon is None:
        log.debug("Latitude or longitude is not set. Returning same timestamp")
        return ts
    Jtr, w0 = computeSuntransitAndDayLenghtForDayTs(ts, lat, -lon, elevation)
    Jrise = Jtr-w0/360
    tsJrise = julianDayToUTC(Jrise)
    return  tsJrise