Commit ea5da433c9f268de6752a3620496464dced1f55f

Authored by Adhidarma Hadiwinoto
1 parent 200f359d8a
Exists in master

moment

Showing 2 changed files with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -21,6 +21,7 @@
21 21 "dependencies": {
22 22 "crypto": "0.0.3",
23 23 "ini": "^1.3.4",
  24 + "moment": "^2.13.0",
24 25 "mongodb": "^2.1.18",
25 26 "sate24": "git+http://gitlab.kodesumber.com/reload97/node-sate24.git",
26 27 "sate24-expresso": "git+http://gitlab.kodesumber.com/reload97/sate24-expresso.git",
... ... @@ -6,6 +6,7 @@ var http = require('http');
6 6 var xml2js = require('xml2js').parseString;
7 7 var mongoClient = require('mongodb').MongoClient;
8 8 var strftime = require('strftime');
  9 +var moment = require('moment');
9 10  
10 11 var config;
11 12 var callbackReport;
... ... @@ -262,7 +263,7 @@ function topupRequest(task, retry) {
262 263 }
263 264  
264 265 if (!task.ts) {
265   - task.ts = strftime('%Y-%m-%d %H:%M:%S', new Date());
  266 + task.ts = moment(task.timestamp, 'YYYYMMDDHHmmss').format('YYYY-MM-DD HH:mm:ss')
266 267 }
267 268  
268 269 var remoteProduct = task.remoteProduct.split(',');