Wrong date in index when used datetoArray

The date value in the document and the view index does not match, is there any issue here?
Here is the sample document:

“id”: 2331367,
“docType”: “m”,
“whenReceivedTimestamp”: “2012-09-30 23:47:26”,
“status”: “A”

Sample view:
function (doc, meta) {
if(meta.type === ‘json’ && doc.docType == “m” ){
emit(dateToArray(doc.whenReceivedTimestamp), null);

In the index, have different value:

I posted this same question on IRC server, and got suggestion to store the timestamp. but even this approach of timestamp, is not giving right date time.

What timezone is your cluster in? dateToArray will convert the time to UTC .

You can read more about dateToArrray here:

To stop this you could change whenReceivedTimestamp to have a Z at the end:

"whenReceivedTimestamp": "2012-09-30 23:47:26Z",