当我向谷歌日历服务网址添加事件时,事件可以添加没有任何错误,但当事件插入谷歌日历它显示不同的时间,为什么它显示不同的时间,任何人帮我解决这个问题,我给我的代码如下。
string location = "India Standard Time";
string sdate = "5/12/2016 09:00:00 AM";
string edate = "5/12/2016 09:15:00 AM";
string descri = "Sample";
string sumary = "Sample";
DateTime start = Convert.ToDateTime(sdate);
DateTime? end = Convert.ToDateTime(edate);
var dates = start.ToString("yyyyMMddTHHmmssZ");
if (end.HasValue && end > start)
{
dates += "/" + end.Value.ToString("yyyyMMddTHHmmssZ");
}
else
{
dates += "/" + start.ToString("yyyyMMddTHHmmssZ");
}
string what = descri;
string websiteName = descri;
string websiteAddress = "****************************";
string path = string.Format("http://www.google.com/calendar/event?action=TEMPLATE&text={0}&dates={1}&details={2}&location={3}&trp=false&sprop={4}&sprop=name:{5}",
what,
dates,
sumary,
location,
websiteName,
websiteAddress);
谢谢,
KARTHIK。