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 Set<ValueRequirement> exogenousRequirements = new HashSet<>();
if (curveConstructionConfiguration.getExogenousConfigurations() != null) {
final List<String> exogenousConfigurations = curveConstructionConfiguration.getExogenousConfigurations();
for (final String name : exogenousConfigurations) {
//TODO deal with arbitrary depth
final ValueProperties properties = ValueProperties.builder()
.with(CURVE_CONSTRUCTION_CONFIG, name)
.get();