oci-typescript-sdk
oci-typescript-sdk copied to clipboard
OciError: Forecasting invalid date range: Passed UTC date does not have the right precision: hours, minutes, seconds, and second fractions must be 0
I'm passing the following object:
requestSummarizedUsagesDetails: {
isAggregateByTime: true,
tenantId: this.#provider.getTenantId(),
timeUsageStarted: new Date(Date.UTC(2023, 6, 18, 0, 0, 0, 0)),
timeUsageEnded: new Date(Date.UTC(2023, 7, 18, 0, 0, 0, 0)),
granularity: usageapi.models.RequestSummarizedUsagesDetails.Granularity.Daily,
queryType: usageapi.models.RequestSummarizedUsagesDetails.QueryType.Cost,
forecast: {
forecastType: usageapi.models.Forecast.ForecastType.Basic,
timeForecastStarted: new Date(Date.UTC(2023, 7, 18, 0, 0, 0, 0)),
timeForecastEnded: new Date(Date.UTC(2023, 8, 3, 0, 0, 0, 0))
},
}
And yet facing the "Passed UTC date does not have the right precision: hours, minutes, seconds, and second fractions must be 0" error.
What have I done wrong?
@samuelastech are you still facing this issue with the latest SDK version?