@@ -9330,7 +9330,10 @@ Office.AppointmentCompose#end:member:
93309330 console.error(`Action failed with message ${result.error.message}`);
93319331 return;
93329332 }
9333- console.log(`Appointment ends: ${result.value}`);
9333+
9334+ const time = result.value;
9335+ const localTime = Office.context.mailbox.convertToLocalClientTime(time);
9336+ console.log(`Appointment ends (local): ${localTime.month + 1}/${localTime.date}/${localTime.year}, ${localTime.hours}:${localTime.minutes}:${localTime.seconds}`);
93349337 });
93359338 - >-
93369339 // Link to full sample:
@@ -10062,7 +10065,10 @@ Office.AppointmentCompose#start:member:
1006210065 console.error(`Action failed with message ${result.error.message}`);
1006310066 return;
1006410067 }
10065- console.log(`Appointment starts: ${result.value}`);
10068+
10069+ const time = result.value;
10070+ const localTime = Office.context.mailbox.convertToLocalClientTime(time);
10071+ console.log(`Appointment starts (local): ${localTime.month + 1}/${localTime.date}/${localTime.year}, ${localTime.hours}:${localTime.minutes}:${localTime.seconds}`);
1006610072 });
1006710073 - >-
1006810074 // Link to full sample:
@@ -10448,7 +10454,13 @@ Office.AppointmentRead#end:member:
1044810454 https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-end-read.yaml
1044910455
1045010456
10451- console.log(`Appointment ends: ${Office.context.mailbox.item.end}`);
10457+ const time = Office.context.mailbox.item.end;
10458+
10459+ const localTime = Office.context.mailbox.convertToLocalClientTime(time);
10460+
10461+ console.log(`Appointment ends (local): ${localTime.month +
10462+ 1}/${localTime.date}/${localTime.year},
10463+ ${localTime.hours}:${localTime.minutes}:${localTime.seconds}`);
1045210464Office.AppointmentRead#enhancedLocation:member:
1045310465 - >-
1045410466 // Link to full sample:
@@ -10786,7 +10798,13 @@ Office.AppointmentRead#start:member:
1078610798 https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-start-read.yaml
1078710799
1078810800
10789- console.log(`Appointment starts: ${Office.context.mailbox.item.start}`);
10801+ const time = Office.context.mailbox.item.start;
10802+
10803+ const localTime = Office.context.mailbox.convertToLocalClientTime(time);
10804+
10805+ console.log(`Appointment starts (local): ${localTime.month +
10806+ 1}/${localTime.date}/${localTime.year},
10807+ ${localTime.hours}:${localTime.minutes}:${localTime.seconds}`);
1079010808Office.AppointmentRead#subject:member:
1079110809 - >-
1079210810 // Link to full sample:
@@ -11845,6 +11863,19 @@ Office.Item:interface:
1184511863 console.log(`Current item is a ${itemType}. A message could be an email, meeting request, meeting response, or meeting cancellation.`);
1184611864 break;
1184711865 }
11866+ Office.LocalClientTime:interface:
11867+ - >-
11868+ // Link to full sample:
11869+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-start-read.yaml
11870+
11871+
11872+ const time = Office.context.mailbox.item.start;
11873+
11874+ const localTime = Office.context.mailbox.convertToLocalClientTime(time);
11875+
11876+ console.log(`Appointment starts (local): ${localTime.month +
11877+ 1}/${localTime.date}/${localTime.year},
11878+ ${localTime.hours}:${localTime.minutes}:${localTime.seconds}`);
1184811879Office.Location#getAsync:member(2):
1184911880 - >-
1185011881 // Link to full sample:
@@ -11902,6 +11933,19 @@ Office.Mailbox#convertToEwsId:member(1):
1190211933 Office.MailboxEnums.RestVersion.v2_0);
1190311934
1190411935 console.log("EWS ID (from REST ID): " + ewsId2);
11936+ Office.Mailbox#convertToLocalClientTime:member(1):
11937+ - >-
11938+ // Link to full sample:
11939+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-start-read.yaml
11940+
11941+
11942+ const time = Office.context.mailbox.item.start;
11943+
11944+ const localTime = Office.context.mailbox.convertToLocalClientTime(time);
11945+
11946+ console.log(`Appointment starts (local): ${localTime.month +
11947+ 1}/${localTime.date}/${localTime.year},
11948+ ${localTime.hours}:${localTime.minutes}:${localTime.seconds}`);
1190511949Office.Mailbox#convertToRestId:member(1):
1190611950 - >-
1190711951 // Link to full sample:
@@ -14324,7 +14368,13 @@ Office.MessageRead#end:member:
1432414368 https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-end-read.yaml
1432514369
1432614370
14327- console.log(`Appointment ends: ${Office.context.mailbox.item.end}`);
14371+ const time = Office.context.mailbox.item.end;
14372+
14373+ const localTime = Office.context.mailbox.convertToLocalClientTime(time);
14374+
14375+ console.log(`Appointment ends (local): ${localTime.month +
14376+ 1}/${localTime.date}/${localTime.year},
14377+ ${localTime.hours}:${localTime.minutes}:${localTime.seconds}`);
1432814378Office.MessageRead#from:member:
1432914379 - >-
1433014380 // Link to full sample:
@@ -14659,7 +14709,13 @@ Office.MessageRead#start:member:
1465914709 https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-start-read.yaml
1466014710
1466114711
14662- console.log(`Appointment starts: ${Office.context.mailbox.item.start}`);
14712+ const time = Office.context.mailbox.item.start;
14713+
14714+ const localTime = Office.context.mailbox.convertToLocalClientTime(time);
14715+
14716+ console.log(`Appointment starts (local): ${localTime.month +
14717+ 1}/${localTime.date}/${localTime.year},
14718+ ${localTime.hours}:${localTime.minutes}:${localTime.seconds}`);
1466314719Office.MessageRead#subject:member:
1466414720 - >-
1466514721 // Link to full sample:
@@ -15567,7 +15623,10 @@ Office.Time#getAsync:member(2):
1556715623 console.error(`Action failed with message ${result.error.message}`);
1556815624 return;
1556915625 }
15570- console.log(`Appointment starts: ${result.value}`);
15626+
15627+ const time = result.value;
15628+ const localTime = Office.context.mailbox.convertToLocalClientTime(time);
15629+ console.log(`Appointment starts (local): ${localTime.month + 1}/${localTime.date}/${localTime.year}, ${localTime.hours}:${localTime.minutes}:${localTime.seconds}`);
1557115630 });
1557215631Office.Time#setAsync:member(1):
1557315632 - >-
0 commit comments