Since the ticks() function isn't available in Liquid, you can try using date
filter to convert; {{ 'now' | date: '%s%N' }}
. If that doesn't work, you could try doing your own function
# Convert a UTC timestamp to ticks
# Usage: {{ '2022-01-01T00:00:00Z' | to_ticks }}
#
# Note: This filter assumes that the input timestamp is in UTC format.
module ToTicksFilter
def to_ticks(input)
Time.parse(input).to_i * 10_000_000 + 62_135_596_800_000_000
end
end
Liquid::Template.register_filter(ToTicksFilter)
where the usage would be {{ '2022-01-01T00:00:00Z' | to_ticks }}
.