Angular Date Pipe Printing Wrong Date After Transforming Original Date Value
Issue is not with pipe, it is when you convert it into string. And this is because of your time zone. I used below approach to get correct value:
>d = new Date();
Tue Jan 09 2018 00:08:38 GMT+0530 (India Standard Time)
>d.toISOString()
"2018-01-08T18:38:38.752Z"
>d.setMinutes(d.getMinutes() - d.getTimezoneOffset());
1515456518752
>d
Tue Jan 09 2018 05:38:38 GMT+0530 (India Standard Time)
>d.toISOString()
"2018-01-09T00:08:38.752Z"
Convert date as d.setMinutes(d.getMinutes() - d.getTimezoneOffset())