[Netlinx-modules-commit] NetLinx-Modules/DawnDusk DawnDuskMod.axs, 1.1, 1.2
Brought to you by:
coffler
|
From: Jeff C. <co...@us...> - 2007-02-25 20:45:01
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/DawnDusk In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv18532/DawnDusk Modified Files: DawnDuskMod.axs Log Message: Fix DawnDuskMod.axs for latest 2007 daylight savings time rules. Latest SlimServerMod changes (primarily for async update support). Index: DawnDuskMod.axs =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/DawnDusk/DawnDuskMod.axs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DawnDuskMod.axs 27 Jan 2003 17:14:57 -0000 1.1 --- DawnDuskMod.axs 25 Feb 2007 20:44:54 -0000 1.2 *************** *** 14,18 **** (* FILE CREATED ON: 01/26/2003 AT: 07:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 01/26/2003 AT: 09:00:20 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 14,18 ---- (* FILE CREATED ON: 01/26/2003 AT: 07:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 02/25/2007 AT: 10:34:19 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 136,155 **** Select { ! // Are we before or after the first Sunday? ! Active (snMonth = 4): { ! SLong snFirstSunday; // Day number for first Sunday ! nTempDOW = Day_Of_Week("'04-07-',itoa(snYear)"); ! snFirstSunday = 7 - nTempDOW + 1; Select { ! // Before first Sunday? (If so, DLS not in effect) ! Active (snDay < snFirstSunday): fDLSActive = 0; // After first Sunday? (If so, DLS is in effect) ! Active (snDay > snFirstSunday): fDLSActive = 1; ! // Must be first Sunday (DLS begins at 2:00 AM) Active (TIME < '02:00:00'): fDLSActive = 0; --- 136,155 ---- Select { ! // Are we before or after the second Sunday in March? ! Active (snMonth = 3): { ! SLong snSecondSunday; // Day number for first Sunday ! nTempDOW = Day_Of_Week("'03-14-',itoa(snYear)"); ! snSecondSunday = 14 - nTempDOW + 1; // Second Sunday of month Select { ! // Before second Sunday? (If so, DLS not in effect) ! Active (snDay < snSecondSunday): fDLSActive = 0; // After first Sunday? (If so, DLS is in effect) ! Active (snDay > snSecondSunday): fDLSActive = 1; ! // Must be second Sunday (DLS begins at 2:00 AM) Active (TIME < '02:00:00'): fDLSActive = 0; *************** *** 160,177 **** } ! // Are we before or after the last Sunday? ! Active (snMonth = 10): { ! SLong snLastSunday; // Day number for last Sunday ! nTempDOW = Day_Of_Week("'10-24-',itoa(snYear)"); ! snLastSunday = 31 - nTempDOW + 1; Select { ! // Before last Sunday? (If so, DLS is in effect) ! Active (snDay < snLastSunday): fDLSActive = 1; ! // After last Sunday? (If so, DLS not in effect) ! Active (snDay > snLastSunday): fDLSActive = 0; --- 160,177 ---- } ! // Are we before or after the first Sunday in November? ! Active (snMonth = 11): { ! SLong snFirstSunday; // Day number for first Sunday ! nTempDOW = Day_Of_Week("'11-07-',itoa(snYear)"); ! snFirstSunday = 31 - nTempDOW + 1; Select { ! // Before first Sunday? (If so, DLS is in effect) ! Active (snDay < snFirstSunday): fDLSActive = 1; ! // After first Sunday? (If so, DLS not in effect) ! Active (snDay > snFirstSunday): fDLSActive = 0; *************** *** 185,193 **** } ! // November through March - DLS is not active ! Active (snMonth > 10 || snMonth < 4): fDLSActive = 0; ! // Must be May through September - DLS is active Active (1): fDLSActive = 1; --- 185,193 ---- } ! // December through February - DLS is not active ! Active (snMonth > 11 || snMonth < 3): fDLSActive = 0; ! // Must be April through October - DLS is active Active (1): fDLSActive = 1; |