Add Feedback domain module: public submission flow, admin CRUD, reporting (#7)
Jenkins Production Deployment
Jenkins Production Deployment
Co-authored-by: Patrick Müller <mail@pmueller.me> Reviewed-on: #7 Co-authored-by: Patrick Mueller <patrick@mueller-patrick.tech> Co-committed-by: Patrick Mueller <patrick@mueller-patrick.tech>
This commit was merged in pull request #7.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Formats a Date using its local getters (not toISOString/UTC), so the
|
||||
* wall-clock time the server is running in is what gets stored/displayed -
|
||||
* never silently shifted by a UTC conversion. Used both for MySQL DATETIME
|
||||
* literals (events.admin.service.ts) and CSV export (csv.service.ts): same
|
||||
* requirement, same format, in either context.
|
||||
*/
|
||||
export const formatDatetime = (value: Date | string | null): string => {
|
||||
if (!value) return '';
|
||||
const d = value instanceof Date ? value : new Date(value);
|
||||
const pad = (n: number) => String(n).padStart(2, '0');
|
||||
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`;
|
||||
};
|
||||
Reference in New Issue
Block a user