Skip to content

Commit 1aedef7

Browse files
committed
fix(timezone): convert dates to UTC
1 parent aebc22c commit 1aedef7

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

create-node-meeting-artifacts.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import environmentConfig from './src/config.mjs';
1616
import * as github from './src/github.mjs';
1717
import * as hackmd from './src/hackmd.mjs';
1818
import * as meetings from './src/meeting.mjs';
19+
import { formatTimezones } from './src/utils/dates.mjs';
1920

2021
const program = new Command();
2122
program
@@ -40,7 +41,7 @@ const githubClient = github.createGitHubClient(config);
4041
const meetingConfig = await meetings.readMeetingConfig(config);
4142

4243
// Step 5: Initialize HackMD client with meeting configuration
43-
const hackmdClient = hackmd.createHackMDClient(config, meetingConfig);
44+
// const hackmdClient = hackmd.createHackMDClient(config, meetingConfig);
4445

4546
if (config.dryRun) {
4647
const gitHubAgendaIssues = await github.getAgendaIssues(
@@ -71,6 +72,11 @@ const events = await calendar.getEventsFromCalendar(
7172

7273
const meetingDate = await calendar.findNextMeetingDate(events, meetingConfig);
7374

75+
76+
console.log(formatTimezones(meetingDate));
77+
78+
throw 1;
79+
7480
// If no meeting is found, exit gracefully
7581
if (!meetingDate) {
7682
const [weekStart, weekEnd] = calendar.getWeekBounds();

src/calendar.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const findNextMeetingDate = async (allEvents, { properties }) => {
4242

4343
for (const event of filteredEvents) {
4444
// Get all recurrences in our timeframe
45-
event.rrule.options.tzid = event.tzid;
45+
event.rrule.options.tzid = 'UTC-6';
4646
const duringOurTimeframe = event.rrule.between(weekStart, weekEnd);
4747

4848
if (duringOurTimeframe.length > 0) {

0 commit comments

Comments
 (0)