forked from GitHubMirrors/silverbullet-icalendar
Bump version to 0.2.7 and add PST localization logging
All checks were successful
Build SilverBullet Plug / build (push) Successful in 27s
All checks were successful
Build SilverBullet Plug / build (push) Successful in 27s
This commit is contained in:
@@ -2,7 +2,7 @@ import { clientStore, config, datastore, editor, index } from "@silverbulletmd/s
|
||||
import { localDateString } from "@silverbulletmd/silverbullet/lib/dates";
|
||||
import { convertIcsCalendar, type IcsCalendar, type IcsEvent, type IcsDateObjects } from "ts-ics";
|
||||
|
||||
const VERSION = "0.2.6";
|
||||
const VERSION = "0.2.7";
|
||||
const CACHE_KEY = "icalendar:lastSync";
|
||||
const DEFAULT_CACHE_DURATION_SECONDS = 21600; // 6 hours
|
||||
|
||||
@@ -85,12 +85,12 @@ function convertDatesToStrings<T>(obj: T, timezones?: any): DateToString<T> {
|
||||
|
||||
if (obj instanceof Date) {
|
||||
const localized = localDateString(obj);
|
||||
console.log(`[iCalendar] Localizing Date Object: UTC=${obj.toISOString()} -> Local=${localized}`);
|
||||
console.log(`[iCalendar] Localizing Date Object: UTC=${obj.toISOString()} -> PST=${localized}`);
|
||||
return localized as DateToString<T>;
|
||||
}
|
||||
if (isIcsDateObjects(obj) && obj.date instanceof Date) {
|
||||
const localized = localDateString(obj.date);
|
||||
console.log(`[iCalendar] Localizing ICS Date: UTC=${obj.date.toISOString()} -> Local=${localized} (TZID: ${obj.timezone || "none"})`);
|
||||
console.log(`[iCalendar] Localizing ICS Date: UTC=${obj.date.toISOString()} -> PST=${localized} (TZID: ${obj.timezone || "none"})`);
|
||||
return localized as DateToString<T>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user