facet.setEstimatedCalories(day.getInt("estimatedCalories"));
facet.setPredictedCalories(day.getInt("predictedCalories"));
facet.json = day.getString("minutes");
facet.lastSync = d.getMillis();
DateTime date = formatter.parseDateTime(day.getString("date"));
facet.date = TimeUtils.dateFormatter.print(date.getMillis());
long fromMidnight = TimeUtils.fromMidnight(date.getMillis(), timeZone.toTimeZone());
long toMidnight = TimeUtils.toMidnight(date.getMillis(), timeZone.toTimeZone());
//Sets the start and end times for the facet so that it can be uniquely defined