2

I want to add timezone offset in utc datetime.Here is my code:

 <td>{{amazon.requested_at | date: 'medium' : 'UTC' : '+0430'}}</td> 

My problem is time is not added to actual time. I want to say that '+0430' is not working

1
  • Do you want to add utc difference to the time or just want to display just 2010-10-29 08:40:23 +0500 Commented Mar 8, 2016 at 11:02

2 Answers 2

1

You need at least AngularJS 1.3.0 because the timezone argument was added from 1.3.0 (https://code.angularjs.org/1.3.0/docs/api/ng/filter/date) and the code should be:

{{amazon.requested_at | date: 'medium' : '+0430'}}

JSFiddle

Sign up to request clarification or add additional context in comments.

Comments

0

The Solution is:

<td>{{amazon.requested_at | date: 'medium' : '+0430' : 'UTC'}}</td> 

1 Comment

The latest argument UTC is useless and it will be skipped, check: code.angularjs.org/1.3.0/docs/api/ng/filter/date

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.