code: public static long getPreviousIntervalStart(long time, int intervalInMinutes, int offsetInMinutes) {
  		long interval = MINUTE_IN_MS * intervalInMinutes;
  		long offset = calculateOffsetInMs(intervalInMinutes, offsetInMinutes);
  		
  		return (interval * ((time + LOCAL_UTC_OFFSET - offset) / (interval))) + offset - LOCAL_UTC_OFFSET;
  	}
docs: Determines the exact time an interval starts based on a time within the interval.
  @param time time in millis
  @param intervalInMinutes
  @param offsetInMinutes
  
  @return the exact time in milliseconds the interval begins local time