PR_ExplodeTime( result, PR_LocalTimeParameters, &ext); ext.tm_year = indate.year; ext.tm_month = indate.month - 1; ext.tm_mday = indate.day; ext.tm_hour = indate.hour; ext.tm_min = indate.minute; ext.tm_sec = indate.second; ext.tm_usec = 0; result = PR_ImplodeTime( &ext );
PRTime ConvertToPrtime ( icaltimetype indate ) {    PRExplodedTime ext;        PR_ExplodeTime( PR_Now(), PR_LocalTimeParameters, &ext);    ext.tm_year = indate.year;    ext.tm_month = indate.month - 1;    ext.tm_mday = indate.day;    ext.tm_hour = indate.hour;    ext.tm_min = indate.minute;    ext.tm_sec = indate.second;    ext.tm_usec = 0;    PRTime result = PR_ImplodeTime( &ext );    PRInt64 usecpermsec;    LL_I2L( usecpermsec, PR_USEC_PER_MSEC );    LL_DIV( result, result, usecpermsec );    return result;}