Back to Geneos FAQ

How to add a time zone on a date before comparing it in a rule

Use the rule’s concat function to add a time zone abbreviation to the cell value.

Concat function in rule

Rule block code:

set $(TIMEZONE) " GMT"
value parseDate ("%Y-%m-%d %H:%M:%S %Z", concat(path "PathCell" value, $(TIMEZONE)))

The parseDate function uses the time zone of the Gateway host. However, there are cases wherein the value displayed on a cell uses a different time zone and the time zone abbreviation is not explicitly displayed. The above solution adds the time zone abbreviation to a cell value prior to comparison or conversion to epoch format.

["Geneos"] ["Geneos > Gateway"] ["FAQ"]

Was this topic helpful?