Failing to pass date from client to server and server to email

278
December 15, 2016, at 1:10 PM

I am passing my array of date from client(angular) to server as follow.

vm.LeaveInput1.leavedate = vm.dateArr.reverse();

In backend Service that is in server(node) side I am accepting and passing it to the model as follows,

userInfo.leavedate = vm.leavedate;

and passing it to the email service which reads template from database and send mail to user. Email template is as follows.

 {
    "name": "Your leave request Details",
    "subject": "You have Leave request from {{emailOutput.employeename}} for {{emailOutput.leavedate}}",
    "content": "Hello {{emailOutput.name}}<br><br>{{emailOutput.employeename}} has sent a leave request for :<br><br>Date {{emailOutput.leavedate}}<br><br>Kindly click below to login to the application to take further action.<br><br><br><br>Thank you<br></h3><br><br>"
}

But thee issue is if I pass the date 1 Feb from client then in email I am receiving 31 January. Can anyone help me solving this issue? Thanks in advance.

READ ALSO
Socket.io view old messages

Socket.io view old messages

I've been reading on how to store messages on socketio,

367
How to implement Android Deeplink without express server in node.js

How to implement Android Deeplink without express server in node.js

I am trying to integrate Android Deeplink with a HTTP server in nodejs

467
What is the best way to authenticate with Facebook in a Chrome Extension?

What is the best way to authenticate with Facebook in a Chrome Extension?

I'm building a chrome extension that is going to interact with a Nodejs/Restify web service that I am also building

285
Does ExpressJS have any security features built-in?

Does ExpressJS have any security features built-in?

I've searched through the documentation and couldn't find any particulars on what kind of security ExpressJS providesI normally work with Node's HTTP module, so I guess that's what I'm comparing with

299