Product Documentation

Expressions for the Citrix ADC system time

The SYS.TIME expression prefix extracts the Citrix ADC system time. You can configure expressions that establish whether a particular event occurred at a particular time or within a particular time range according to the Citrix ADC system time.

The following table describes the expressions that you can create by using the SYS.TIME prefix.

  • SYS.TIME.BETWEEN(<time1>, <time2>):

    Returns a Boolean TRUE if the returned value is later than <time1> and earlier than <time2>.

    You format the <time1>, <time2> arguments as follows:

    • They must both be GMT or both LOCAL.
    • <time2> must be later than <time1>.

    For example, if the current time is GMT 2005 May 1 10h 15m 30s, and it is the first Sunday of the month, you can specify the following:

    • sys.time.between(GMT 2004, GMT 2006)
    • sys.time.between(GMT 2004 Jan, GMT 2006 Nov)
    • sys.time.between(GMT 2004 Jan, GMT 2006)
    • sys.time.between(GMT 2005 May Sun_1, GMT 2005 May Sun_3)
    • sys.time.between(GMT 2005 May 1, GMT May 2005 1)
    • sys.time.between(LOCAL 2005 May 1, LOCAL May 2005 1)
  • SYS.TIME.DAY:

    Returns the current day of the month as a number from 1 through 31.

  • SYS.TIME.EQ(<time>):

    Returns a Boolean TRUE if the current time is equal to the <time> argument.

    For example, if the current time is GMT 2005 May 1 10h 15m 30s, and it is the first Sunday of the month, you can specify the following (evaluation results are shown in parentheses):

    • sys.time.eq(GMT 2005) (TRUE in this example.)
    • sys.time.eq(GMT 2005 Dec) (FALSE in this example.)
    • sys.time.eq(LOCAL 2005 May) (Evaluates to TRUE or FALSE in this example, depending on the current time zone.)
    • sys.time.eq(GMT 10h) (TRUE in this example.)
    • sys.time.eq(GMT 10h 30s) (TRUE in this example.)
    • sys.time.eq(GMT May 10h) (TRUE in this example.)
    • sys.time.eq(GMT Sun) (TRUE in this example.)
    • sys.time.eq(GMT May Sun_1) (TRUE in this example.)
  • SYS.TIME.NE(<time>):

    Returns a Boolean TRUE if the current time is not equal to the <time> argument.

  • SYS.TIME.GE(<time>):

    Returns a Boolean TRUE if the current time is later than or equal to <time>.

    For example, if the current time is GMT 2005 May 1 10h 15m 30s, and it is the first Sunday of the month, you can specify the following (evaluation results are shown in parentheses):

    • sys.time.ge(GMT 2004) (TRUE in this example.)
    • sys.time.ge(GMT 2005 Jan) (TRUE in this example.)
    • sys.time.ge(LOCAL 2005 May) (TRUE or FALSE in this example, depending on the current time zone.)
    • sys.time.ge(GMT 8h) (TRUE in this example.)
    • sys.time.ge(GMT 30m) (FALSE in this example.)
    • sys.time.ge(GMT May 10h) (TRUE in this example.)
    • sys.time.ge(GMT May 10h 0m) (TRUE in this example.)
    • sys.time.ge(GMT Sun) (TRUE in this example.)
    • sys.time.ge(GMT May Sun_1) (TRUE in this example.)
  • SYS.TIME.GT(<time>):

    Returns a Boolean TRUE if the time value is later than the <time> argument.

    For example, if the current time is GMT 2005 May 1 10h 15m 30s, and it is the first Sunday of the month, you can specify the following (evaluation results are shown in parentheses):

    • sys.time.gt(GMT 2004) (TRUE in this example.)
    • sys.time.gt(GMT 2005 Jan) (TRUE in this example.)
    • sys.time.gt(LOCAL 2005 May) (TRUE or FALSE, depending on the current time zone. )
    • sys.time.gt(GMT 8h) (TRUE in this example.)
    • sys.time.gt(GMT 30m) (FALSE in this example.)
    • sys.time.gt(GMT May 10h) (FALSE in this example.)
    • sys.time.gt(GMT May 10h 0m) (TRUE in this example.)
    • sys.time.gt(GMT Sun) (FALSE in this example.)
    • sys.time.gt(GMT May Sun_1) (FALSE in this example.)
  • SYS.TIME.HOURS:

    Returns the current hour as an integer from 0 to 23.

  • SYS.TIME.LE(<time>):

    Returns a Boolean TRUE if the current time value precedes or is equal to the <time> argument.

    For example, if the current time is GMT 2005 May 1 10h 15m 30s, and it is the first Sunday of the month, you can specify the following (evaluation results are shown in parentheses):

    • sys.time.le(GMT 2006) (TRUE in this example.)
    • sys.time.le(GMT 2005 Dec) (TRUE in this example.)
    • sys.time.le(LOCAL 2005 May) (TRUE or FALSE depending on the current timezone. )
    • sys.time.le(GMT 8h) (FALSE in this example.)
    • sys.time.le(GMT 30m) (TRUE in this example.)
    • sys.time.le(GMT May 10h) (TRUE in this example.)
    • sys.time.le(GMT Jun 11h) (TRUE in this example.)
    • sys.time.le(GMT Wed) (TRUE in this example.)
    • sys.time.le(GMT May Sun_1) (TRUE in this example.)
  • SYS.TIME.LT(<time>):

    Returns a Boolean TRUE if the current time value precedes the <time> argument.

    For example, if the current time is GMT 2005 May 1 10h 15m 30s, and it is the first Sunday of the month, you can specify the following (evaluation results are shown in parentheses):

    • sys.time.lt(GMT 2006) (TRUE in this example.)
    • sys.time.lt.time.lt(GMT 2005 Dec) (TRUE in this example.)
    • sys.time.lt(LOCAL 2005 May) (TRUE or FALSE depending on the current time zone.)
    • sys.time.lt(GMT 8h) (FALSE in this example.)
    • sys.time.lt(GMT 30m) (TRUE in this example.)
    • sys.time.lt(GMT May 10h) (FALSE in this example.)
    • sys.time.lt(GMT Jun 11h) (TRUE in this example.)
    • sys.time.lt(GMT Wed) (TRUE in this example.)
    • sys.time.lt(GMT May Sun_1) (FALSE in this example.)
  • SYS.TIME.MINUTES:

    Returns the current minute as an integer from 0 to 59.

  • SYS.TIME.MONTH:

    Extracts the current month and returns an integer from 1 (January) to 12 (December).

  • SYS.TIME.RELATIVE_BOOT:

    Calculates the number of seconds to the closest previous or scheduled reboot, and returns an integer.

    If the closest boot time is in the past, the integer is negative. If it is in the future, the integer is positive.

  • SYS.TIME.RELATIVE_NOW:

    Calculates the number of seconds between the current Citrix ADC system time and the specified time, and returns an integer showing the difference.

    If the designated time is in the past, the integer is negative; if it is in the future, the integer is positive.

  • SYS.TIME.SECONDS:

    Extracts the seconds from the current Citrix ADC system time, and returns that value as an integer from 0 to 59.

  • SYS.TIME.WEEKDAY:

    Returns the current weekday as a value from 0 (Sunday) to 6 (Saturday).

  • SYS.TIME.WITHIN (<time1>, <time2>):

    If you omit an element of time in <time1>, for example, the day or hour, it is assumed to have the lowest value in its range. If you omit an element in <time2>, it is assumed to have the highest value of its range.

    The ranges for the elements of time are as follows: month 1-12, day 1-31, weekday 0-6, hour 0-23, minutes 0-59 and seconds 0-59. If you specify the year, you must do so in both <time1> and <time2>.

    For example, if the time is GMT 2005 May 10 10h 15m 30s, and it is the second Tuesday of the month, you can specify the following (evaluation results are shown in parentheses):

    • sys.time.within(GMT 2004, GMT 2006) (TRUE in this example.)
    • sys.time.within(GMT 2004 Jan, GMT 2006 Mar) (FALSE, May is not in the range of January to March.)
    • sys.time.within(GMT Feb, GMT) (TRUE, May is in the range of February to December.)
    • sys.time.within(GMT Sun_1, GMT Sun_3) (TRUE, the second Tuesday is between the first Sunday and the third Sunday.)
    • sys.time.within(GMT 2005 May 1 10h, GMT May 2005 1 17h) (TRUE in this example.)
    • sys.time.within(LOCAL 2005 May 1, LOCAL May 2005 1) (TRUE or FALSE, depending on the Citrix ADC system time zone.)
  • SYS.TIME.YEAR:

    Extracts the year from the current system time and returns that value as a four-digit integer.

Expressions for the Citrix ADC system time

In this article