question: public static long periodEnd ( long now , long period ) { LocalDateTime time = LocalDateTime . ofEpochSecond ( now / 1000 , 0 , ZoneOffset . UTC ) ; long endTime = periodEnd ( now , period , time ) ; return endTime ; }
target:  Calculates the next period end.  The calculation is in local time.