SimpleFeature sf = context.getCurrentFeature();
try {
String[] times = execute(context.getTemplate(), sf);
if (times != null && times.length > 0) {
if (times.length == 1) {
TimeStamp stamp = pm.createAndSetTimeStamp();
stamp.setWhen(times[0]);
} else {
TimeSpan span = pm.createAndSetTimeSpan();
span.setBegin(times[0]);
span.setEnd(times[1]);
}