Time zones

If CRM.interface and Exchange server/connector are located in different time zones, differing contact times are stored in Aurea CRM and Outlook. Therefore connector SE sends time-zone information with in the SYNCML header.

To correct this behavior, the following must be added to the SymcML_gw2mm.xslt style sheet:

A variable (vTimeOffset) which can be used to specify the time difference in hours (note: not the difference to UTC, but the difference between the two time zones):

e.g. <xsl:variable name='vTimeOffset'>9</xsl:variable>

Add the following section below the <xsl:template match="syncml:Meta"> template:

<!-- Changes used to convert the synchronization time period -->
<xsl:template match="metinf:AnchorUpdate/metinf:Last">
 <xsl:element name="Last" namespace="syncml:metinf" >
  <xsl:value-of select="user2:computeTimestamp(string(.),number($vTimeOffset))"/>
 </xsl:element>
</xsl:template>
<xsl:template match="metinf:AnchorUpdate/metinf:Next">
 <xsl:element name="Next" namespace="syncml:metinf" >
  <xsl:value-of select="user2:computeTimestamp(string(.),number($vTimeOffset))"/>
 </xsl:element>
</xsl:template>

Add the conversion function computeTimestamp to the <msxsl:script language='JScript' implements-prefix='user2'> section.

function computeTimestamp(strTimestamp, offset)
{
	var tmp, n, tz;
	if (strTimestamp.charAt(8) == 'T')
		strTimestamp = strTimestamp.substr(0,8) + strTimestamp.substr(9);
	d1 = new Date(
			parseInt(strTimestamp.substr(0,4),10),
			parseInt(strTimestamp.substr(4,2),10),
			parseInt(strTimestamp.substr(6,2),10),
			parseInt(strTimestamp.substr(8,2),10) + parseInt(offset),
			parseInt(strTimestamp.substr(10,2),10),
			parseInt(strTimestamp.substr(12,2),10)
	);
	tmp=d1.getFullYear().toString()
	n=d1.getMonth();

	if (n<10)
		tmp+="0";
	tmp+=d1.getMonth().toString();
	n=d1.getDate();
	if(n<10)
		tmp+="0";
	tmp+=d1.getDate().toString()+"T";
	n=d1.getHours();
	if(n<10)
		tmp+="0";
	tmp+=d1.getHours().toString();
	n=d1.getMinutes();
	if(n<10)
		tmp+="0";
	tmp+=d1.getMinutes().toString();
	n=d1.getSeconds()
	if(n<10)
		tmp+="0";
	tmp+=d1.getSeconds().toString();

	//strTimestampCorrected=tmp.substr(0,8) + "T" + tmp.substr(9);

	return tmp;
}