I’m using an API workflow to capture a Stripe event, however Stripe uses unix time for their date fields. Could the date field be updated to support unix time format?
Otherwise is there a way for me to convert the unix time to the correct date format?
However when the workflow is triggered the date value is not being stored.
I assumed it’s because it’s trying to write “1538199710” into the field and it doesn’t recognise it.
Anyway I managed to find a plugin (secondsToDate) to do the conversion.
Could be bugged. I’ve not tried that. But docs say that Unix time stamps will come across as dates. If it doesn’t, file a support ticket/bug report. I just did that on date ranges (which aren’t even documented). You’re one up on me!
Using the method suggested to set current time set to 1/1/1970 +seconds works. However I have to do this in a number of places. Is there a better way to reuse this logic rather than reimplementing it everywhere?
I have the exact same problem, and this looks like a perfect solution, however the links are broken and I can’t see what the solution is Does anyone have a working link to these screenshots? (I assume they’re screenshots!)
@emmanuel any idea if this is being fixed in the near future? Is Stripe an outlier here in sending seconds vs. milliseconds or is this something that might have a fix in the future.
My use case is to turn the unix timestamp that Stripe sends back into a date. Right now, if I change the API call to recognize it as a date, it shows up with a 1970s date. If I change it to be a number, there’s no where for me to format the number as a date using the Unix timestamp logic.
One fix would be to let you treat a number as a unix timestamp and let you format as a date.
Another potential fix -> in the Bubble API, when making a call I can change the format to date. Maybe it’s possible to let you choose how to format the unix timestamp.
Open to other suggestions, but when I’m wanting to print the unix timestamp as a date, using a plugin doesn’t work. I.e., “Your next renewal date is [Unix Timestamp Formated as Date w/ Milliseconds].”
I’m also struggling integrating Intercom at the moment because of the need to send it UTC Unix formatted dates, it would be great if Bubble could handle this type of date format natively.
I have this setup and it’s converting the time to UTC. How would I get it to adjust based on the User’s current time zone? Selecting User’s current time zone in the Time zone selection doesn’t change it.
Did you get this figured out, @telaholcomb? If not, it’d be helpful to know the value and the context. What exactly is the number of seconds, and from where is it coming?