Format of dates and times in an expression
When configuring an advanced policy expression in a policy that works with dates and times (for example, the Citrix ADC system time or a date in an SSL certificate), you specify a time format as follows:
GMT|LOCAL [<yyyy>] [<month>] [<d>] [<h>] [<m>] [<s>]
<yyyy> is a four-digit year after GMT or LOCAL.
<month> is a three-character abbreviation for the month, for example, Jan, Dec.
<d> is a day of the week or an integer for the date.
You cannot specify the day as Monday, Tuesday, and so on. You specify either an integer for a specific day of the month, or you specify a date as the first, second, third weekday of the month, and so on. Following are examples of specifying a day of the week:
- Sun_1 is the first Sunday of the month.
- Sun_3 is the third Sunday of the month.
- Wed_3 is the third Wednesday of the month.
- 30 is an example of an exact date in a month.
<h> is the hour, for example, 10h.
<s> is the number of seconds, for example, 30s.
The following example expression is true if the date is between 2008 Jan and 2009 Jan, based on GMT.
http.req.date.between(GMT 2008 Jan, GMT 2009 Jan)
The following example expression is true for March and all months that follow March in the calendar year, based on GMT:
sys.time.ge(GMT 2008 Mar)
When you specify a date and time, note that the format is case sensitive and must preserve the exact number of blank spaces between entries.
**Note:** In an expression that requires two time values, both must use GMT or both must use LOCAL. You cannot mix the two in an expression. Unlike when you use the SYS.TIME prefix in an advanced policy expression, if you specify SYS.TIME in a rewrite action, the Citrix ADC returns a string in conventional date format (for example, Sun, 06 Nov 1994 08:49:37 GMT). For example, the following rewrite action replaces the http.res.date header with the Citrix ADC system time in a conventional date format: add rewrite action sync_date replace http.res.date sys.time