From 5eeebba6cfc97c39e2ca4e56af2a2073410fe5a9 Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Mon, 13 Apr 2020 12:26:52 -0500 Subject: [PATCH] v9.2.2-rc22 - Possible fix for time-based criteria. --- VERSION | 2 +- farmbot_core/lib/farmbot_core/asset/criteria_retriever.ex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 38ac43e1..858f2f84 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.2.2-rc21 +9.2.2-rc22 diff --git a/farmbot_core/lib/farmbot_core/asset/criteria_retriever.ex b/farmbot_core/lib/farmbot_core/asset/criteria_retriever.ex index ebb927ea..ee1708e1 100644 --- a/farmbot_core/lib/farmbot_core/asset/criteria_retriever.ex +++ b/farmbot_core/lib/farmbot_core/asset/criteria_retriever.ex @@ -138,8 +138,8 @@ defmodule FarmbotCore.Asset.CriteriaRetriever do { pg, accum } else - op = day_criteria["op"] || ">" - time = Timex.shift(Timex.now(), days: days) + op = day_criteria["op"] || "<" + time = Timex.shift(Timex.now(), days: -1 * days) inverted_op = if op == ">" do "<" else ">" end