I have a date value in each of my objects that I can print as follows:
<td> {{competition.compStart }}</td>
And here is what it looks like:
1931-05-31T00:00:00.000+0000
To change the format to make it more readable, I use the Angular date protocol:
<td> {{competition.compStart | date : "dd/MM/yyyy"}}</td>
Using this result:
30/05/1931
As you can see, it displays the previous day (May 30, not May 31).
As far as I understand, the problem is related to the time zone, since I'm in Argentina, and we have GMT-3, then 00:00 the 31st minute 3 hours will be May 30 at 9 pm.
So, how can I get this to take the time literally, and not process it based on the time zone, but still apply the format in the pipe?
source
share