From nobody@FreeBSD.org  Thu Mar 22 14:04:02 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 6C8271065670
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 22 Mar 2012 14:04:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 4D4438FC1B
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 22 Mar 2012 14:04:02 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ME41jg069417
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 22 Mar 2012 14:04:01 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q2ME411S069406;
	Thu, 22 Mar 2012 14:04:01 GMT
	(envelope-from nobody)
Message-Id: <201203221404.q2ME411S069406@red.freebsd.org>
Date: Thu, 22 Mar 2012 14:04:01 GMT
From: Florian k Unglaub <f.unglaub@googlemail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Contradicting information in crontab(5) and cron(8) about DST
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         166318
>Category:       docs
>Synopsis:       Contradicting information in crontab(5) and cron(8) about DST
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gjb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 22 14:10:13 UTC 2012
>Closed-Date:    Sat May 05 02:53:54 UTC 2012
>Last-Modified:  Sat May  5 03:00:30 UTC 2012
>Originator:     Florian k Unglaub
>Release:        9.0 RELEASE
>Organization:
none
>Environment:
FreeBSD mars 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
The crontab(5) man page clearly states that jobs scheduled in the lost hour from winter to summer time are lost and are executed twice in the summer to winter transition. 


BUGS
     If you are in one of the 70-odd countries that observe Daylight Savings
     Time, jobs scheduled during the rollback or advance will be affected.  In
     general, it is not a good idea to schedule jobs during this period.
     
     For US timezones (except parts of IN, AZ, and HI) the time shift occurs
     at 2AM local time.  For others, the output of the zdump(8) program's ver?
     bose (-v) option can be used to determine the moment of time shift.


However, cron(8) states that jobs scheduled between 2AM and 3AM are executed correctly if cron is started with the "-s" switch (which is the default).

Relevant parts from cron(8):


     -s      Enable special handling of situations when the GMT offset of the
             local timezone changes, such as the switches between the standard
             time and daylight saving time.

             The jobs run during the GMT offset changes time as intuitively
             expected.  If a job falls into a time interval that disappears
             (for example, during the switch from standard time) to daylight
             saving time or is duplicated (for example, during the reverse
             switch), then it is handled in one of two ways:

             The first case is for the jobs that run every at hour of a time
             interval overlapping with the disappearing or duplicated inter?
             val.  In other words, if the job had run within one hour before
             the GMT offset change (and cron was not restarted nor the
             crontab(5) changed after that) or would run after the change at
             the next hour.  They work as always, skip the skipped time or run
             in the added time as usual.

             The second case is for the jobs that run less frequently.  They
             are executed exactly once, they are not skipped nor executed
             twice (unless cron is restarted or the user's crontab(5) is
             changed during such a time interval).  If an interval disappears
             due to the GMT offset change, such jobs are executed at the same
             absolute point of time as they would be in the old time zone.
             For example, if exactly one hour disappears, this point would be
             during the next hour at the first minute that is specified for
             them in crontab(5).

/usr/src/usr.sbin/cron/cron.c states clearly in lines 210 ff. that the behaviour follows the cron(8) description.
>How-To-Repeat:

>Fix:
Remove the BUGS section in crontab(5)

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: gjb 
State-Changed-When: Sat Apr 28 22:48:03 UTC 2012 
State-Changed-Why:  
A change has been committed to address this issue. 

Rather than removing the BUGS section entirely, I reworded 
the document to mention that disabling '-s' (which is 
enabled by default) may cause a problem with jobs scheduled 
when the time changes. 

MFC pending. 



Responsible-Changed-From-To: freebsd-doc->gjb 
Responsible-Changed-By: gjb 
Responsible-Changed-When: Sat Apr 28 22:48:03 UTC 2012 
Responsible-Changed-Why:  
I committed a fix. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=166318 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/166318: commit references a PR
Date: Sat, 28 Apr 2012 22:48:14 +0000 (UTC)

 Author: gjb (doc committer)
 Date: Sat Apr 28 22:48:00 2012
 New Revision: 234775
 URL: http://svn.freebsd.org/changeset/base/234775
 
 Log:
   As cron(8) is started with '-s' by default, timezones that observe
   DST should not need to worry about scheduling jobs when the DST time
   changes.
   
   Rather than removing the BUGS section in crontab(5) regarding this,
   note that disabling '-s' may still cause jobs to be executed twice or
   not at all.
   
   PR:		166318
   Submitted by:	Florian k Unglaub (f.unglaub%googlemail!com)
   MFC After:	1 week
 
 Modified:
   head/usr.sbin/cron/crontab/crontab.5
 
 Modified: head/usr.sbin/cron/crontab/crontab.5
 ==============================================================================
 --- head/usr.sbin/cron/crontab/crontab.5	Sat Apr 28 22:03:19 2012	(r234774)
 +++ head/usr.sbin/cron/crontab/crontab.5	Sat Apr 28 22:48:00 2012	(r234775)
 @@ -17,7 +17,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd January 28, 2012
 +.Dd April 28, 2012
  .Dt CRONTAB 5
  .Os
  .Sh NAME
 @@ -296,10 +296,21 @@ are extensions.
  .An Paul Vixie Aq paul@vix.com
  .Sh BUGS
  If you are in one of the 70-odd countries that observe Daylight
 -Savings Time, jobs scheduled during the rollback or advance will be
 -affected.
 +Savings Time, jobs scheduled during the rollback or advance may be
 +affected if
 +.Xr cron 8
 +is not started with the
 +.Fl s
 +flag.
  In general, it is not a good idea to schedule jobs during
 -this period.
 +this period if
 +.Xr cron 8
 +is not started with the
 +.Fl s
 +flag, which is enabled by default.
 +See
 +.Xr cron 8
 +for more details.
  .Pp
  For US timezones (except parts of AZ and HI) the time shift occurs at
  2AM local time.
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: gjb 
State-Changed-When: Sat May 5 02:53:35 UTC 2012 
State-Changed-Why:  
MFC complete. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=166318 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/166318: commit references a PR
Date: Sat,  5 May 2012 02:52:55 +0000 (UTC)

 Author: gjb (doc committer)
 Date: Sat May  5 02:52:41 2012
 New Revision: 235047
 URL: http://svn.freebsd.org/changeset/base/235047
 
 Log:
   MFC r234775:
   
   As cron(8) is started with '-s' by default, timezones that observe
   DST should not need to worry about scheduling jobs when the DST time
   changes.
   
   Rather than removing the BUGS section in crontab(5) regarding this,
   note that disabling '-s' may still cause jobs to be executed twice or
   not at all.
   
   PR:		166318
 
 Modified:
   stable/9/usr.sbin/cron/crontab/crontab.5
 Directory Properties:
   stable/9/usr.sbin/cron/crontab/   (props changed)
 
 Modified: stable/9/usr.sbin/cron/crontab/crontab.5
 ==============================================================================
 --- stable/9/usr.sbin/cron/crontab/crontab.5	Sat May  5 00:30:43 2012	(r235046)
 +++ stable/9/usr.sbin/cron/crontab/crontab.5	Sat May  5 02:52:41 2012	(r235047)
 @@ -17,7 +17,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd January 28, 2012
 +.Dd April 28, 2012
  .Dt CRONTAB 5
  .Os
  .Sh NAME
 @@ -296,10 +296,21 @@ are extensions.
  .An Paul Vixie Aq paul@vix.com
  .Sh BUGS
  If you are in one of the 70-odd countries that observe Daylight
 -Savings Time, jobs scheduled during the rollback or advance will be
 -affected.
 +Savings Time, jobs scheduled during the rollback or advance may be
 +affected if
 +.Xr cron 8
 +is not started with the
 +.Fl s
 +flag.
  In general, it is not a good idea to schedule jobs during
 -this period.
 +this period if
 +.Xr cron 8
 +is not started with the
 +.Fl s
 +flag, which is enabled by default.
 +See
 +.Xr cron 8
 +for more details.
  .Pp
  For US timezones (except parts of AZ and HI) the time shift occurs at
  2AM local time.
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/166318: commit references a PR
Date: Sat,  5 May 2012 02:53:21 +0000 (UTC)

 Author: gjb (doc committer)
 Date: Sat May  5 02:53:02 2012
 New Revision: 235048
 URL: http://svn.freebsd.org/changeset/base/235048
 
 Log:
   MFC r234775:
   
   As cron(8) is started with '-s' by default, timezones that observe
   DST should not need to worry about scheduling jobs when the DST time
   changes.
   
   Rather than removing the BUGS section in crontab(5) regarding this,
   note that disabling '-s' may still cause jobs to be executed twice or
   not at all.
   
   PR:		166318
 
 Modified:
   stable/8/usr.sbin/cron/crontab/crontab.5
 Directory Properties:
   stable/8/usr.sbin/cron/crontab/   (props changed)
 
 Modified: stable/8/usr.sbin/cron/crontab/crontab.5
 ==============================================================================
 --- stable/8/usr.sbin/cron/crontab/crontab.5	Sat May  5 02:52:41 2012	(r235047)
 +++ stable/8/usr.sbin/cron/crontab/crontab.5	Sat May  5 02:53:02 2012	(r235048)
 @@ -17,7 +17,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd January 28, 2012
 +.Dd April 28, 2012
  .Dt CRONTAB 5
  .Os
  .Sh NAME
 @@ -296,10 +296,21 @@ are extensions.
  .An Paul Vixie Aq paul@vix.com
  .Sh BUGS
  If you are in one of the 70-odd countries that observe Daylight
 -Savings Time, jobs scheduled during the rollback or advance will be
 -affected.
 +Savings Time, jobs scheduled during the rollback or advance may be
 +affected if
 +.Xr cron 8
 +is not started with the
 +.Fl s
 +flag.
  In general, it is not a good idea to schedule jobs during
 -this period.
 +this period if
 +.Xr cron 8
 +is not started with the
 +.Fl s
 +flag, which is enabled by default.
 +See
 +.Xr cron 8
 +for more details.
  .Pp
  For US timezones (except parts of AZ and HI) the time shift occurs at
  2AM local time.
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/166318: commit references a PR
Date: Sat,  5 May 2012 02:53:27 +0000 (UTC)

 Author: gjb (doc committer)
 Date: Sat May  5 02:53:19 2012
 New Revision: 235049
 URL: http://svn.freebsd.org/changeset/base/235049
 
 Log:
   MFC r234775:
   
   As cron(8) is started with '-s' by default, timezones that observe
   DST should not need to worry about scheduling jobs when the DST time
   changes.
   
   Rather than removing the BUGS section in crontab(5) regarding this,
   note that disabling '-s' may still cause jobs to be executed twice or
   not at all.
   
   PR:		166318
 
 Modified:
   stable/7/usr.sbin/cron/crontab/crontab.5
 Directory Properties:
   stable/7/usr.sbin/cron/crontab/   (props changed)
 
 Modified: stable/7/usr.sbin/cron/crontab/crontab.5
 ==============================================================================
 --- stable/7/usr.sbin/cron/crontab/crontab.5	Sat May  5 02:53:02 2012	(r235048)
 +++ stable/7/usr.sbin/cron/crontab/crontab.5	Sat May  5 02:53:19 2012	(r235049)
 @@ -17,7 +17,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd January 28, 2012
 +.Dd April 28, 2012
  .Dt CRONTAB 5
  .Os
  .Sh NAME
 @@ -296,10 +296,21 @@ are extensions.
  .An Paul Vixie Aq paul@vix.com
  .Sh BUGS
  If you are in one of the 70-odd countries that observe Daylight
 -Savings Time, jobs scheduled during the rollback or advance will be
 -affected.
 +Savings Time, jobs scheduled during the rollback or advance may be
 +affected if
 +.Xr cron 8
 +is not started with the
 +.Fl s
 +flag.
  In general, it is not a good idea to schedule jobs during
 -this period.
 +this period if
 +.Xr cron 8
 +is not started with the
 +.Fl s
 +flag, which is enabled by default.
 +See
 +.Xr cron 8
 +for more details.
  .Pp
  For US timezones (except parts of AZ and HI) the time shift occurs at
  2AM local time.
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
