Compare commits

...

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
17f390545a Fix timezone issue by providing default 'UTC' value
Co-authored-by: estruyf <2900833+estruyf@users.noreply.github.com>
2025-12-03 15:02:31 +00:00
copilot-swe-agent[bot]
de569d37d5 Initial plan 2025-12-03 14:54:14 +00:00
2 changed files with 2 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ export class PanelSettings {
},
date: {
format: Settings.get<string>(SETTING_DATE_FORMAT) || '',
timezone: Settings.get<string>(SETTING_GLOBAL_TIMEZONE) || ''
timezone: Settings.get<string>(SETTING_GLOBAL_TIMEZONE) || 'UTC'
},
tags: (await TaxonomyHelper.get(TaxonomyType.Tag)) || [],
categories: (await TaxonomyHelper.get(TaxonomyType.Category)) || [],

View File

@@ -2,6 +2,6 @@ import { SETTING_GLOBAL_TIMEZONE } from '../constants';
import { DateHelper, Settings } from '../helpers';
export const formatInTimezone = (date: Date, dateFormat: string) => {
const timezone = Settings.get<string>(SETTING_GLOBAL_TIMEZONE);
const timezone = Settings.get<string>(SETTING_GLOBAL_TIMEZONE) || 'UTC';
return DateHelper.formatInTimezone(date, dateFormat, timezone) || '';
};