Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AM20
Newbie

Roku API JSON date format timezone

In the JSON response of the validate-transaction endpoint the date fields, such as expirationDatehave the format /Date(1581033062000+0000)/ (this is the example from the docs).

It is assumed that the long number is the unix epoch timestamp in milliseconds. The question is about the timezone that comes after it.

Has the timezone already affected the unix timestamp in this date format?

For example, do the dates /Date(1500000000000+0000)/ and /Date(1500000000000+0100)/ represent the same instant in time or are they actually 1 hour different?

I ask because unix timestamps are always in UTC so this Roku format is highly unusual if the timezone has already been taken account of in the unix timestamp part. I.e. /Date(1500000000000+0100)/ is equivalent to /Date(1499996400000+0000)/

If the two dates in the first example DO represent the same instant in time, and the long number part is always in UTC, then the timezone is completely superfluous.

Thank you for any clarification.

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.