@Override
public CompiledFunctionDefinition compile(final FunctionCompilationContext context, final Instant atInstant) {
final ZonedDateTime atZDT = ZonedDateTime.ofInstant(atInstant, ZoneOffset.UTC);
final ConfigSource configSource = OpenGammaCompilationContext.getConfigSource(context);
final CurveConstructionConfigurationSource curveConfigurationSource = new ConfigDBCurveConstructionConfigurationSource(configSource);
final Instant versionTime = atZDT.plus(1, ChronoUnit.HOURS).truncatedTo(ChronoUnit.HOURS).toInstant();
//TODO work out a way to use dependency graph to get curve information for this config
final CurveConstructionConfiguration curveConstructionConfiguration = curveConfigurationSource.getCurveConstructionConfiguration(_configurationName,
VersionCorrection.of(versionTime, versionTime));
if (curveConstructionConfiguration == null) {
throw new OpenGammaRuntimeException("Could not get curve construction configuration called " + _configurationName);
}
final ConventionSource conventionSource = OpenGammaCompilationContext.getConventionSource(context);