我想通过图表API向我的日历添加一个事件。
我使用此端点https://graph.microsoft.com/v1.0/me/events 我创建了我的课程事件来注册我的活动
General
我有正确设置开始日期的问题。我的起始对象就是那样
...
public void processSheet(
StylesTable styles,
ReadOnlySharedStringsTable strings,
SheetContentsHandler sheetHandler,
InputStream sheetInputStream) throws IOException, SAXException {
DataFormatter formatter = new DataFormatter();
formatter.addFormat("General", new java.text.DecimalFormat("#.#"));
...
我尝试了不同的方法来设置值
public class Event
{
public string subject { get; set; }
public Body body { get; set; }
public Start start { get; set; }
public End end { get; set; }
public Location location { get; set; }
public List<Attendee> attendees { get; set; }
}
但我的会议仍在同一时间。我如何选择参加会议的时区?
答案 0 :(得分:0)
将其设置为UTC。
lunch.start = new Start()
{
dateTime = DateTime.ToUniversalTime().ToString()
// timeZone = "UTC" // This is supposed to be the friendly name like Pacific Standard Time. I think this is optional.
};