mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-23 03:06:04 +02:00
Work on using UserProps, fix up ISO timestamps, etc.
This commit is contained in:
parent
4bd340a480
commit
b82c640014
10 changed files with 95 additions and 50 deletions
|
@ -67,7 +67,13 @@ function loadDatabaseForMod(modInfo, cb) {
|
|||
|
||||
function getISOTimestampString(ts) {
|
||||
ts = ts || moment();
|
||||
return ts.format('YYYY-MM-DDTHH:mm:ss.SSSZ');
|
||||
if(!moment.isMoment(ts)) {
|
||||
if(_.isString(ts)) {
|
||||
ts = ts.replace(/\//g, '-');
|
||||
}
|
||||
ts = moment(ts);
|
||||
}
|
||||
return ts.utc().format('YYYY-MM-DDTHH:mm:ss.SSS[Z]');
|
||||
}
|
||||
|
||||
function sanatizeString(s) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue