Is SubscriptionContract's nextBillingDate value incorrect ?

We tested to buy a daily subscription product at 2021-02-03T02:00:00Z. Then, We called SubscriptionContract GraphQL. Like below.

 

 

subscriptionContract(id: $id) {
  id
  nextBillingDate
}

 


It returns this.

 

{
  id: 'gid://shopify/SubscriptionContract/35127445',
  nextBillingDate: '2021-02-03T21:00:00Z',
}

 

 

The "nextBillingDate" value should be 2021-02-04T02:00:00Z or 2021-02-03T21:00-05:00.

0 Likes

For now, We add 5 hours to the nextBilligDate value for this issue.

0 Likes
BStubbs
Shopify Partner
124 14 45

After the successful BillingAttempt, are you setting the new nextBillingDate with a local or UTC datetime? It should be a UTC datetime.

Was this helpful? Press like!
Did it fix the problem? Mark it as the solution for others!
Buy me a beer? Well, sure!

Thanks for replying.

After the successful BillingAttempt, are you setting the new nextBillingDate with a local or UTC datetime? It should be a UTC datetime.

No, We just do to buy a daily subscription product.  Then, We called SubscriptionContract GraphQL.

0 Likes
BStubbs
Shopify Partner
124 14 45

Sounds like someone is confusing a UTC and a local timezone when the SubscriptionContract is created. Maybe take this to the Subscriptions API forum section?

Was this helpful? Press like!
Did it fix the problem? Mark it as the solution for others!
Buy me a beer? Well, sure!

Oh, nice idea! I didn't know that section Thanks. I'll post the same question.

0 Likes