Bubble defaults empty and null dates to 1970

I’ve reached out to bubble support a few times regarding dates and how they are handled incorrectly in the bubble logic. Posting here since support hasn’t resolved the issue and just gave a “workaround”.

Dates default to 1970 jan 1 when:

  • a date is empty when using min/max operators
  • date field is empty (always evaluates to 1970, which means :min always returns 1970 instead of null)
  • invalid formatted date - defaults to 1970
  • external api dates in responses - default to 1970 if null
  • custom states with no date value = 1970

Workaround:

  • use conditional check to null the 1970 date back out if it is written
  • exclude records without dates when doing min/max evaluations (still returns 1970 if no records are found)

Essentially I have to add additional steps whenever working with dates when I’m doing evaluations like min/max because the data returns 1970 very consistently instead of null.

January 1st 1970 = 0 seconds in unix time which is the reason for the issue, never noticed this behaviour though so good spot

I feel like that is a new bug…never experienced that before

I first noticed it about a year ago from what I remember

I’ve logged several bug tickets about it but don’t get any solution other than a work around

the point is that an empty date should be an empty date not 1970
the database shows the field as empty so the dev expects it to be empty in the evaluation but it is not, empty dates evaluate to 1970 instead
causes me a lot of headaches as I use min/max on dates a lot for 1 app

the only solution is to ensure there is always a valid date returned by doing something like:
search for dates plus valid date :min/max

or to do the search with min max and then clean it up in another workflow step
if date before 2000 then null the date (I never have dates before 2000 in this app so that logic works in my use case)

this post is more me venting than anything since my bug tickets don’t go anywhere

This topic was automatically closed after 14 days. New replies are no longer allowed.