// Server-side dates should be in UTC. They will be converted to a local dates in UI according to provided TimeZone.
// Submitted local dates in UI are converted back to UTC, so that server receives all dates in UTC again.
Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
cal.set(2014, Calendar.JUNE, 22, 17, 30, 0);
model.add(new TimelineEvent("<div>RMP aberta</div><img src='" + contextPath + "/img/add.png' style='width:16px;height:16px;'>", cal.getTime()));
cal.set(2014, Calendar.JUNE, 23, 23, 0, 0);
model.add(new TimelineEvent("<div>Encaminhado p/ RD</div><img src='" + contextPath
+ "/img/user_go.png' style='width:16px;height:16px;'>",
cal.getTime()));
// read-only event
cal.set(2014, Calendar.JUNE, 24, 21, 45, 0);
model.add(new TimelineEvent("<div>Encaminhado Setor Destino</div><img src='" + contextPath
+ "/img/arrow_right.png' style='width:16px;height:16px;'>", cal.getTime(),
false, null, "readonly"));
cal.set(2014, Calendar.JUNE, 26, 0, 0, 0);
Date startWork = cal.getTime();
cal.set(2014, Calendar.JUNE, 2, 0, 0, 0);
Date endWork = cal.getTime();
model.add(
new TimelineEvent(
"<img src='" + contextPath
+ "/resources/images/timeline/homework.png' style='width:31px;height:29px;'><span style='padding:8px'>Homework</span>",
startWork, endWork));
cal.set(2014, Calendar.JUNE, 28, 0, 0, 0);
model.add(new TimelineEvent("<div>Plano de ação cadastrado</div><img src='" + contextPath
+ "/img/script_add.png' style='width:16px;height:16px;'>", cal.getTime()));
// read-only event
cal.set(2014, Calendar.JUNE, 31, 0, 0, 0);
Date startReport = cal.getTime();
cal.set(2014, Calendar.JUNE, 3, 0, 0, 0);
Date endReport = cal.getTime();
model.add(
new TimelineEvent(
"<img src='" + contextPath
+ "/resources/images/timeline/report.png' style='width:32px;height:31px;'><span style='padding:8px'>Report</span>",
startReport, endReport, false, null, "readonly"));
}