1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-26 20:54:21 +01:00

Merge branch 'dev' for release 6.3.40

This commit is contained in:
Du Peng 2025-02-24 17:49:55 +01:00
commit bfe76eab69
3 changed files with 8 additions and 4 deletions

View File

@ -2,6 +2,10 @@
## Next release ## Next release
## v6.3.40 2025 February 24
- Fix a bug: machine reservation time in my reservations is incorrect
## v6.3.39 2025 February 3 ## v6.3.39 2025 February 3
- Fix a bug: unable to cancel a PayZen subscription - Fix a bug: unable to cancel a PayZen subscription

View File

@ -62,7 +62,7 @@ export default class FormatLib {
*/ */
private static parseISOtime = (date: TDateISO|TDateISOShortTime): Date => { private static parseISOtime = (date: TDateISO|TDateISOShortTime): Date => {
const isoTimeMatch = (date as string)?.match(/(^|T)(\d\d:\d\d)/); const isoTimeMatch = (date as string)?.match(/(^|T)(\d\d:\d\d)/);
return new Date(`1970-01-01T${isoTimeMatch[2]}:00${Fablab.timezone_offset}`); return new Date(`${moment().format('YYYY-MM-DD')}T${isoTimeMatch[2]}:00${Fablab.timezone_offset}`);
}; };
/** /**
@ -77,10 +77,10 @@ export default class FormatLib {
*/ */
static time = (date: Date|TDateISO|TDateISOShortTime): string => { static time = (date: Date|TDateISO|TDateISOShortTime): string => {
let tempDate: Date; let tempDate: Date;
if (FormatLib.isShortTimeISO(date as string) || FormatLib.isDateISO(date as string)) { if (FormatLib.isShortTimeISO(date as string)) {
tempDate = FormatLib.parseISOtime(date as TDateISOShortTime); tempDate = FormatLib.parseISOtime(date as TDateISOShortTime);
} else { } else {
tempDate = moment(date).toDate(); tempDate = moment.utc(date).toDate();
} }
return Intl.DateTimeFormat(Fablab.intl_locale, { hour: 'numeric', minute: 'numeric', timeZone: Fablab.timezone }).format(tempDate); return Intl.DateTimeFormat(Fablab.intl_locale, { hour: 'numeric', minute: 'numeric', timeZone: Fablab.timezone }).format(tempDate);
}; };

View File

@ -1,6 +1,6 @@
{ {
"name": "fab-manager", "name": "fab-manager",
"version": "6.3.39", "version": "6.3.40",
"description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.", "description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.",
"keywords": [ "keywords": [
"fablab", "fablab",