clock/clockmw/clocktimezone/src/timezoneclient.cpp
changeset 55 2c54b51f39c4
parent 45 b6db4fd4947b
child 57 bb2d3e476f29
equal deleted inserted replaced
51:0b38fc5b94c6 55:2c54b51f39c4
    66 void TimezoneClient::deleteInstance()
    66 void TimezoneClient::deleteInstance()
    67 {
    67 {
    68 	if (mReferenceCount) {
    68 	if (mReferenceCount) {
    69 		delete mTimezoneClient;
    69 		delete mTimezoneClient;
    70 		mTimezoneClient = 0;
    70 		mTimezoneClient = 0;
       
    71 		mReferenceCount = false;
    71 	}
    72 	}
    72 }
    73 }
    73 
    74 
    74 /*!
    75 /*!
    75 	Call this function to check if the object is NULL.
    76 	Call this function to check if the object is NULL.
   464 	RArray<int> offsetArray;
   465 	RArray<int> offsetArray;
   465 	idArray.Append(timezoneId);
   466 	idArray.Append(timezoneId);
   466 
   467 
   467 	tzHandle.GetOffsetsForTimeZoneIdsL(idArray, offsetArray);
   468 	tzHandle.GetOffsetsForTimeZoneIdsL(idArray, offsetArray);
   468 	int stdOffset = offsetArray[0];
   469 	int stdOffset = offsetArray[0];
       
   470 	
       
   471 	if (isDSTOnL(timezoneId)) {
       
   472 		CTzId* tzId = CTzId::NewL( timezoneId );
       
   473 		CleanupStack::PushL( tzId );
       
   474 		
       
   475 		// Get the offset with DST enabled.
       
   476 		getUtcDstOffsetL(stdOffset, *tzId);
       
   477 		
       
   478 		CleanupStack::PopAndDestroy(tzId);
       
   479 		
       
   480     }
   469 
   481 
   470 	offsetArray.Close();
   482 	offsetArray.Close();
   471 	idArray.Close();
   483 	idArray.Close();
   472 
   484 
   473 	// Cleanup.
   485 	// Cleanup.