Unix Converting Incorrectly

Hey all —

I’ve setup a stripe API call for subscriptions and have been able to pull what I need. As was expected, dates were posted as Unix timestamps and labeld as a “number” when I initialized my call.

I changed the label to be “date” instead so I can manipulate it.

The only problem is that it is now returning a date of 1/18/1970 8:05pm

I thought I must have done something wrong so I “extracted” the date back to Unix and it’s the correct date of Sept. 30.

Anyone experience this problem? It seems beyond logic to me. Is it a bug?

Here’s how I have it setup:
15%20AM
Here’s what prints:
10%20AM

Date 1 is somehow being converted by Bubble to January 18, 1970 date despite the fact that it’s the correct unix stamp…see below.

Here’s the correct extraction to Unix:
39%20AM

Double check that conversation online. It’s probably using a timezone. Bubble Should receive this as a number and not a date.

Also note Epoch time is in UTC and not local timezone. You should double check the docs on strip

Thanks, @AliFarahat. I’m not sure how that would account for the 1970 year. Any thoughts there?

I think you’ll find a couple of ways to do this here: Convert unix time to date field

1 Like

This! Thanks!