Chapter 3: Condition Reference
hour=
Tests if the time of day is in the specified range or an exact match. The current time is determined by the ProxySG appliance’s configured clock and time zone by default, although the UTC time zone can be specified by using the form hour.utc=. The numeric pattern used to test the hour= condition contains no whitespace.
Note: Any range of hours or exact hour includes all the minutes in the final hour. See the “Examples” section.
Syntax
hour[.utc]={first_hour]..[last_hour]exact_hour}
where:
•
•
•
Note: To test against an inverted range, such as a range that crosses from one day into the next, the following shorthand expression is available. While hour=(..0619..) specifies midnight to 6:59 a.m. and 7:00 p.m. to midnight, the policy language also recognizes hour=19..06 as equivalent.
Layer and Transaction Notes
•Use in all layers.
•Using
•Applies to all transactions.
Examples
;Tests for 3:00 a.m. to 1:59 p.m. UTC. hour.utc=03..13
;The following example restricts access to external sites during business hours.
;This rule assumes that the user has access that must be restricted.
<proxy>
;Internal site always available, no action required server_url.domain=xyz.com
;Restrict other sites during business hours
deny weekday=1..5 hour=9..16
; If a previous rule had denied access, then this rule could provide an exception.
77