SYS.TIME.WITHIN not working correctly together with minutes

SYS.TIME.WITHIN not working correctly together with minutes

book

Article ID: CTX206057

calendar_today

Updated On:

Description

more info you can refer the edocs http://docs.citrix.com/en-us/netscaler/10-5/ns-appexpert-con-10/ns-pi-gen-pol-config-wrapper-10-con/ns-pi-adv-exp-work-date-time-num-wrapper-con/ns-pi-exp-ns-sys-time-con.html

Additional Information

Expression “SYS.TIME.WITHIN” is not working correctly with minutes.

When the expression is used without minutes, then it is working as expected. Customer need the minute values for automated maintenance page, which begins under the hour.

After further discussion with the internal team and testing the lab all the fields in the time is distinct and evaluated separately. When we define minutes we need to make sure the system time minutes is with-in the specified range.
 
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.
Below is working and non-working expressions tested in the lab as example.
 
Working:
 
> sh run | grep redirect
add responder action redirect_to_google redirect "\"https://www.google.com\"" -responseStatusCode 302
add responder policy redirect_google_pol "SYS.TIME.WITHIN(GMT 2016 JAN 01 01h 01m   ,GMT 2016 JAN 26 20h 40m   )" redirect_to_google
bind lb vserver http_lb_vip -policyName redirect_google_pol -priority 100 -gotoPriorityExpression END -type REQUEST
 
root@# date
Tue Jan 26 06:06:57 UTC 2016
 
root@santosh2# date
Tue Jan 26 06:06:57 UTC 2016
root@# nsconmsg -g pipal -g pcp -s disptime=1 -d current | more
Displaying performance information
NetScaler V20 Performance Data
NetScaler NS11.0: Build 63.16.nc, Date: Oct  4 2015, 08:25:25
 
 
reltime:mili second between two records Tue Jan 26 06:08:05 2016
  Index   rtime totalcount-val      delta rate/sec symbol-name&device-no&time
      0   14000              3          1        0 pipal_tot_success_exec_immediate_actions  Tue Jan 26 06:08:05 2016
      1       0              3          1        0 pcp_hits responder(redirect_google_pol) Tue Jan 26 06:08:05 2016
 
Non- Working:
 
> sh run | grep redirect
add responder action redirect_to_google redirect "\"https://www.google.com\"" -responseStatusCode 302
add responder policy redirect_google_pol "SYS.TIME.WITHIN(GMT 2016 JAN 01 01h 20m   ,GMT 2016 JAN 26 20h 40m   )" redirect_to_google
bind lb vserver http_lb_vip -policyName redirect_google_pol -priority 100 -gotoPriorityExpression END -type REQUEST
 
root@santosh2# date
Tue Jan 26 06:10:47 UTC 2016-----------------------------------------------------------------------------------à As we can see the Minutes Configured is within 20-40, but the system time minutes is 10 which is not within the configured range.
 
root@# nsconmsg -g pipal -g pcp -s disptime=1 -d current | more
Displaying performance information
NetScaler V20 Performance Data
NetScaler NS11.0: Build 63.16.nc, Date: Oct  4 2015, 08:25:25
 
 
reltime:mili second between two records Tue Jan 26 06:11:07 2016
  Index   rtime totalcount-val      delta rate/sec symbol-name&device-no&time
      0    7000              6          3        0 rsp_pipal_eval_failed  Tue Jan 26 06:11:07 2016