so I'm making a little redirect on my Shopify website that runs on Liquid given that a customer doesn't have an active subscription-based upon a one day time requirement but every time the page loads, it seems to redirect anyway. expirationDate is the Order created_at plus 1 day. I just don't understand why the conditional expirationDate < today_date is forcing a redirect even when the expirationDate is further in time than the current date.
Values that show on the webpage:
expirationDate: January 29, 2020 05:12PM today_date: January 28, 2020 06:49PM
{% capture expirationDate %} {{ ordercreatedat | date: '%s' | plus: 86400 | date: '%B %d, %Y %I:%M%p' }} {% endcapture %}
{% assign today_date = 'now' | date: '%B %d, %Y %I:%M%p' %}
<p>{{ expirationDate }}
<p>{{ today_date }}
{% if expirationDate < today_date %}
<script>
window.location = "google.com"
</script>
{% else %}
<div class="rte">
{{ page.content }}
</div>
{% endif %}