conditional liquid code based on Metafields Guru and current time does not render on occasion

Setup:

On my store theme files, I have a conditional code which shows a “coming soon” button in place of a “sold out” or “add to cart” button for certain products. To achieve this, I am using Metafields Guru app.

The condition to show “coming soon” is

  • there is a metafield for the product of type “Date and Time” e.g. 2022/09/21 22:00
  • the difference between current time and this metafield is greater than 0 i.e. the metafield value is in the future

Problem:

On my test products, the button successfully changed from “coming soon” to “add to cart” when I refreshed the page on the time indicated by the metafield. However, for my actual product for which more than 800 customers accessed at launch, the button did not change to “add to cart”.

Here is the liquid code:

{%- liquid
    assign start_time = product.metafields.global.start_time | date: "%s"
    assign current_time = "now" | date: "%s"
    assign timezone = 9 | times: 60 | times: 60
    assign time_left = start_time | minus: current_time | minus: timezone
-%}

<span>
    {% if time_left > 0 %}
        Coming Soon...
    {%- elsif product.selected_or_first_available_variant.available -%}
    {{ 'products.product.add_to_cart' | t }}
    {%- else -%}
    {{ 'products.product.sold_out' | t }}
    {%- endif -%}
</span>

Could the amount of accesses have affected the rendering of the page? Or would there be another reason why this would not work only for specific products?

Thanks for reading!

Just a thought but maybe the time left and the product sold out are in conflict for some of the products. I.e. the time is over AND the product has no stock?