AngularDeveloper AngularDeveloper - 1 year ago 65
AngularJS Question

I'm not able to bind time correctly in table

I tried by placing lot of directives to display correct time in table.But I couldn't make this done.I'm sharing the fiddle here.The time in table is 5:30 min more than what I have given.Please help me to solve this.


Answer Source

The issue is the timezone, You need to convert using a filter to local timezone,

You could check this by adding like this,

<td>{{row.description  | UTCToNow  }}</td>


myapp.filter('UTCToNow', ['moment', function (moment) {
     return function (input, format) {
           return  moment.utc(input).format('LLL');        



Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download