Search code examples
phplaravelstripe-paymentssubscriptionlaravel-cashier

datetime issue when create a new subscription in Stripe - when subscription buyed from the users timezone


I am trying to create subscription in stripe through php sdk. subscription created successfully but here is the issue,When i create a subscription from UTC timezone my date is 2021-01-08 13:05:25 but in the dashboard subscription created in 2021-01-07 23:35. Also in the stripe response gave me 2021-01-08 13:05:25.my data is generated according to the 2021-01-08. so i am confused, my subscription is deduct on next 7 or 8.

Please let me know if my question is not clear enough or I missed something.


Solution

  • Check laravel application timezone in /config/app.php

    'timezone' => 'UTC',
    

    Set it as UTC