Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OciError: Forecasting invalid date range: Passed UTC date does not have the right precision: hours, minutes, seconds, and second fractions must be 0 #218

Open
samuelastech opened this issue Jul 18, 2023 · 1 comment

Comments

@samuelastech
Copy link

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?

@bhagwatvyas
Copy link
Member

@samuelastech are you still facing this issue with the latest SDK version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants