I've saved my Date with UTC format in my database. To show the date in the proper format is using angular2 moment.
<small class="fr font-10">{{ task.updated_at | amTimeAgo}} | {{ 1517229284787 | amTimeAgo }}</small>
The above statement is my case. Here the first binding showing invalid date format error. At the same time in the second date binding, it works fine when am entering the same task.updated_at value manually (i.e the second data binding). And also I checked the value of task.updated_at value separately. It gets me the UTC date. Solution, please