Skip to content
Snippets Groups Projects
Commit d1e5995e authored by Cédric Moreau's avatar Cédric Moreau
Browse files

--amstart option handles "DD-MM-YYYY hh:mm:ss" syntax too

parent b6d36989
No related branches found
No related tags found
No related merge requests found
......@@ -423,8 +423,10 @@ function connect(listenHTTP, serverFactory, callback) {
function parseMoment (d) {
if (d.toLowerCase() == 'now') {
return parseInt(moment().format("X"));
} else if (d.match(/\d{2}-\d{2}-\d{4}/)) {
} else if (d.match(/^\d{2}-\d{2}-\d{4}$/)) {
return parseInt(moment(d, "DD-MM-YYYY").format("X"));
} else if (d.match(/^\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}$/)) {
return parseInt(moment(d, "DD-MM-YYYY hh:mm:ss").format("X"));
} else {
return parseInt(d);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment