bigbaicai

芯方式是以半导体人、电子工程师等电子行业相关领域从业人员为核心的知识经验学习、分享、交流社群。 凭借开放、合作、共赢的运营理念,聚集了来自国内外知名院校和顶尖科技公司的半导体人、电子工程师。 我们致力于营造专业、认真、有温度的分享交流环境,将高质量的内容和方案成规模地生产和分享,帮助个人和团队在芯方式找到有价值的Key。 http://www.icfans.com/

Email收到的邮件显示的时间比实际时间差一小时

0
阅读(1094) 评论(0)

[DESCRIPTION]
Email收到的邮件显示的时间比实际时间差一小时。
[SOLUTION]
1、在函数mmi_email_folder_get_async_items中在for循环后需要定义的变量:
/* fill data */
for (j = 0; j < num_item; j++)
{
U16 status_img;
S8 *subject_ptr = NULL;
//add begin
U32 curr_time;
U32 local_time;
BOOL has_attach = FALSE, is_read = FALSE;
applib_time_struct time_info = {0};
applib_time_struct curr_time_info = {0};
applib_time_struct time1;
kal_char *t,*pp,*prop,*string,*mm;
U32 result;
kal_char time_buff[EMAIL_MAX_DATE_TIME_STR_LEN+1];
kal_uint32 y;
//add end
2、在ICFANS
mmi_ucs2cpy((S8*)menuData[j].item_list[1], (S8*)temp->dt_buff);
mmi_ucs2cat((S8*)menuData[j].item_list[1], (S8*)temp->size_buff);
两句code前添加如下code:
mmi_ucs2_to_asc(time_buff,temp->dt_buff);
t=time_buff;
prop = (kal_char*) kal_strtok_r(t, ".", &pp);
y = strtoul((const kal_char*)prop, NULL, 10);
time1.nDay=(kal_uint8) y;
t=+3;
prop = (kal_char*) kal_strtok_r(NULL, ".", &pp);
y = strtoul((const kal_char*)prop, NULL, 10);
time1.nMonth=(kal_uint8) y;
t=+3;
prop = (kal_char*) kal_strtok_r(NULL, " ", &pp);
y = strtoul((const kal_char*)prop, NULL, 10);
time1.nYear=(kal_uint16) y;
t=+5;
prop = (kal_char*) kal_strtok_r(NULL, ":", &pp);
y = strtoul((const kal_char*)prop, NULL, 10);
time1.nHour=(kal_uint8) y;
t=+3;
prop = (kal_char*) kal_strtok_r(NULL, " ", &pp);
y = strtoul((const kal_char*)prop, NULL, 10);
time1.nMin=(kal_uint8) y;
result = applib_dt_mytime_2_utc_sec(&time1,KAL_FALSE);
local_time = applib_dt_sec_utc_to_local(result);
applib_dt_utc_sec_2_mytime(local_time, &time_info, MMI_FALSE);
kal_wsprintf(
(WCHAR*)menuData[j].item_list[1],
"%02d.%02d.%04d %02d:%02d",
time_info.nMonth,
time_info.nDay,
time_info.nYear,
time_info.nHour,
time_info.nMin);
3、同时去掉语句mmi_ucs2cpy((S8*)menuData[j].item_list[1], (S8*)temp->dt_buff);