J. Bakshi wrote:
> I have the following to block facebook during 9 AM to 6 PM
>   iptables -I FORWARD -p tcp -m multiport --dport 80,443 -d 69.171.224.0/19 
> -m time \ --timestart 09:00 --timestop 18:00 -j REJECT
> But the time scheduled is followed incorrectly. The stat time
> activated at 1 PM and the stop time at 23 PM. What is the wrong with
> time module ? The server timezone is set to Asia/Kolkata

Isn't that the difference between you local timezone and UTC?  I know
that --localtz is supposed to be the default but it is appearing as if
--utc is set there.

(And isn't your timezone +0530 not +0500 so shouldn't that have been
1:30 and 23:30?
  $ TZ=Asia/Kolkata date -R -d 9:00
  Mon, 27 Feb 2012 09:00:00 +0530
)

Try setting --localtz explicitly.  Or try subtracting your timezone
+0530 from the timestart and timestop options with --timestart 03:30
--timestop 12:30.  Or try setting the times in UTC.

Bob

Attachment: signature.asc
Description: Digital signature

Reply via email to