Make tests time zone independent

This commit is contained in:
Cadence Ember 2025-10-07 14:09:50 -05:00
parent 7916f82b55
commit 5b7433de32
3 changed files with 3 additions and 1 deletions

View file

@ -611,7 +611,7 @@ async function messageToEvent(message, guild, options = {}, di) {
const event = invite.guild_scheduled_event
if (!event) continue // the event ID provided was not valid
const formatter = new Intl.DateTimeFormat("en-NZ", {month: "long", day: "numeric", hour: "numeric", minute: "2-digit", timeZoneName: "shortGeneric"}) // 9 June at 3:00 pm NZT
const formatter = new Intl.DateTimeFormat("en-NZ", {month: "long", day: "numeric", hour: "numeric", minute: "2-digit", timeZoneName: "shortGeneric", timeZone: reg.ooye.time_zone}) // 9 June at 3:00 pm NZT
const rep = new mxUtils.MatrixStringBuilder()
// Add time

1
src/types.d.ts vendored
View file

@ -31,6 +31,7 @@ export type AppServiceRegistrationConfig = {
discord_origin?: string
discord_cdn_origin?: string,
web_password: string
time_zone?: string
}
old_bridge?: {
as_token: string

View file

@ -25,6 +25,7 @@ reg.namespaces = {
aliases: [{regex: "#_ooye_.*:cadence.moe", exclusive: true}]
}
reg.ooye.bridge_origin = "https://bridge.example.org"
reg.ooye.time_zone = "Pacific/Auckland"
const sync = new HeatSync({watchFS: false})