1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-21 00:55:17 +00:00

Can create a new account

This commit is contained in:
2019-12-30 13:44:54 +01:00
parent 48cb254b9b
commit 994d1540dc
5 changed files with 76 additions and 1 deletions

View File

@ -6,4 +6,16 @@
export function time() : number {
return Math.floor((new Date()).getTime()/1000);
}
/**
* Get the current date formatted for the "DATETIME" object of
* a MySQL database
*/
export function mysql_date() : string {
const date = new Date();
return date.getFullYear() + "-" + (date.getMonth()+1) + "-" + (date.getDate() + 1)
+ " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
}