Search based on creation Identity date in Advanced Analytics

Why the filter doesn’t work? The returned value works with DATE$LONG_NUMBER

I am using this GroupDefinition

  <GroupFilter>
    <CompositeFilter operation="OR">
      <Filter operation="GT" property="created">
        <Value>
          <Script>
            <Source>
              import java.time.LocalDate;
              import java.time.ZoneId;
              import java.util.Date;
              import java.time.Instant;

              LocalDate today = LocalDate.now();

              LocalDate previousDate = today.minusDays(1);

              Instant previousDateInstant = previousDate.atStartOfDay(ZoneId.systemDefault()).toInstant();
              long timestampMillis = previousDateInstant.toEpochMilli();

              return timestampMillis;
            </Source>
          </Script>
        </Value>
      </Filter>
    </CompositeFilter>
  </GroupFilter>

Thanks