I am getting data back from server like 2020-02-17 15:36:47
(with no time zone descriptor). This is a date that is generated BY the server and is actually in UTC time (the server's "local" time). However, it is stored as DateTime in MySQL without time zone information.
When I get this back from the server, I need to convert it to local time, but when I try to apply date pipe like dateVariable | date: 'short' : 'UTC'
it actually adds time rather than takes it away (my local time is EST) - so I get 2/17/20, 8:36 PM
where it should actually be 2/17/20, 10:36 AM
.
I guess ths issue is that the client assumes the time coming from the server is already local time, and my pipe is converting it to UTC. In fact, I want to do the opposite - the server time is stored as UTC (even though it is not indicated as such in MySQL DateTime column), and I want to convert to EST (local) using the date pipe. I've searched about and not sure how to handle this outside of modifying what the server returns.