#talker - Time Zones
1 messages · Page 1 of 1 (latest)
Hello! The Stripe API is generally not timezone-aware. Everything uses Unix timestamps. Can you provide more details about what exactly you're trying to do or what issue you're having?
My company is in PST, I am in EST. For example if i schedule a subscription for 4/12/2022 00:00:00 the start date will show up in the stripe dashboard as 4/11/2022. If i change the payload and put 4/12/2022 03:00:00 only than the scheduled subscription startdate will show up as 04/12/2022
I am using the Stripe.Net nuget package, so far i having seen where those unix epoch seconds apply. I am thinking maybe the nuget package abstracts that.
Can you share the code you're using? Usually you would set the timestamp as a plain integer, like StartDate = 1650320197 for example.
Where is the code that defines startDate?
its passed into the function as a DateTime object
Oh, startDate is a DateTime. Make it an integer instead which is a Unix timestamp.
What happens if you try? The code snippet here shows an integer being used, for example: https://stripe.com/docs/api/subscription_schedules/create?lang=dotnet
i also seen that in the stripe documentation, but this causes a build error.
as you can see it's underlined and the build error is at the bottom of the screen
used the exact same example here 1650320872
Hi there! Taking over for Rubeus. Give me a few minutes to get up to speed.
ok thanks
At first glance, this looks like either an error with our docs or an error with our library. It should be able to accept an int , but it's erroring on my end as well
Are you able to submit using a DateTime type instead of int?
Alternatively, if you want to set to the time of creation, you can use StartDate = SubscriptionScheduleStartDate.Now,