mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Add support for server-specific timezone and date format settings
This commit is contained in:
parent
ddbbc543c2
commit
c67a1df11d
51 changed files with 326 additions and 168 deletions
|
@ -18,12 +18,13 @@ export function initArchives(app: express.Express) {
|
|||
let body = archive.body;
|
||||
|
||||
// Add some metadata at the end of the log file (but only if it doesn't already have it directly in the body)
|
||||
// TODO: Use server timezone / date formats
|
||||
if (archive.body.indexOf("Log file generated on") === -1) {
|
||||
const createdAt = moment(archive.created_at).format("YYYY-MM-DD [at] HH:mm:ss [(+00:00)]");
|
||||
const createdAt = moment.utc(archive.created_at).format("YYYY-MM-DD [at] HH:mm:ss [(+00:00)]");
|
||||
body += `\n\nLog file generated on ${createdAt}`;
|
||||
|
||||
if (archive.expires_at !== null) {
|
||||
const expiresAt = moment(archive.expires_at).format("YYYY-MM-DD [at] HH:mm:ss [(+00:00)]");
|
||||
const expiresAt = moment.utc(archive.expires_at).format("YYYY-MM-DD [at] HH:mm:ss [(+00:00)]");
|
||||
body += `\nExpires at ${expiresAt}`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue