Skip to content

Commit 41de8c4

Browse files
fix: local and calendar time alignment (#1903)
Removes assumption that local time is aligned with the calendar time. Closes #1886 (#1903)
1 parent cd06fe2 commit 41de8c4

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

packages/mgt-components/src/components/mgt-agenda/mgt-agenda.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -617,15 +617,6 @@ export class MgtAgenda extends MgtTemplatedComponent {
617617
}
618618

619619
private prettyPrintTimeFromDateTime(date: Date) {
620-
// If a preferred time zone was sent in the Graph request
621-
// times are already set correctly. Do not adjust
622-
if (!this.preferredTimezone) {
623-
// If no preferred time zone was specified, the times are in UTC
624-
// fall back to old behavior and adjust the times to the browser's
625-
// time zone
626-
date.setMinutes(date.getMinutes() - date.getTimezoneOffset());
627-
}
628-
629620
let hours = date.getHours();
630621
const minutes = date.getMinutes();
631622
const ampm = hours >= 12 ? 'PM' : 'AM';

0 commit comments

Comments
 (0)