Thursday, November 20, 2008 ..:: Forums ::.. Register  Login
 Forums Minimize
SearchForum Home
     
  Mainstream Forums  Bugs  Activities modu...
 Re: Activities module -- edit call results in wrong start time
 
csmirk
11 posts
Joined
8/24/2008

Re: Activities module -- edit call results in wrong start time
Posted: 21 Oct 08 6:06 AM

Timezones table is okay, it the code in TimeZone.IsDaylightSavings(DateTime dtZoneTime) that is causing the plus or minus any hour.

It needs more work than I can contribute at moment but I can  I have marked as // 08/25/2008 Cam. in function that I have copied below.

Cheers, Cameron

public bool IsDaylightSavings(DateTime dtZoneTime)

{

bool bDaylightSavings = false;

int nLocalMonth = dtZoneTime.Month;

if ( nLocalMonth == m_nDAYLIGHT_MONTH )

{

DateTime dtTransitionDate = TransitionDate(dtZoneTime.Year, m_nDAYLIGHT_MONTH, m_nDAYLIGHT_WEEK, m_nDAYLIGHT_DAYOFWEEK, m_nDAYLIGHT_HOUR, m_nDAYLIGHT_MINUTE);

if ( m_nDAYLIGHT_MONTH > m_nSTANDARD_MONTH )

{

//if ( dtZoneTime < dtTransitionDate )

// 08/25/2008 Cam.

if (dtZoneTime > dtTransitionDate)

bDaylightSavings = true;

}

else

{

if ( dtZoneTime > dtTransitionDate )

bDaylightSavings = true;

}

}

else if ( nLocalMonth == m_nSTANDARD_MONTH )

{

DateTime dtTransitionDate = TransitionDate(dtZoneTime.Year, m_nSTANDARD_MONTH, m_nSTANDARD_WEEK, m_nSTANDARD_DAYOFWEEK, m_nSTANDARD_HOUR, m_nSTANDARD_MINUTE);

if ( m_nDAYLIGHT_MONTH > m_nSTANDARD_MONTH )

{

if ( dtZoneTime > dtTransitionDate )

bDaylightSavings = true;

}

else

{

if ( dtZoneTime < dtTransitionDate )

bDaylightSavings = true;

}

}

else

{

if ( m_nDAYLIGHT_MONTH > m_nSTANDARD_MONTH )

{

//if ( nLocalMonth > m_nSTANDARD_MONTH && nLocalMonth < m_nDAYLIGHT_MONTH )

// 08/25/2008 Cam.

if (nLocalMonth < m_nSTANDARD_MONTH || nLocalMonth > m_nDAYLIGHT_MONTH)

bDaylightSavings = true;

}

else

{

if ( nLocalMonth > m_nDAYLIGHT_MONTH && nLocalMonth < m_nSTANDARD_MONTH )

bDaylightSavings = true;

}

}

return bDaylightSavings;

}

  Mainstream Forums  Bugs  Activities modu...

Forum Home  Search       

Copyright (c) 2006-2008 SplendidCRM Software, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement
DotNetNuke® is copyright 2002-2008 by Perpetual Motion Interactive Systems Inc.
SplendidCRM and SplendidCRM Software are trademarks of SplendidCRM Software, Inc. SugarCRM is a trademark of SugarCRM Inc. in the United States, the European Union and other countries. All other trademarks used in this web site are the property of their respective owners.