I need to display time retrieved from a dynamic SOQL and display at visualforce page using remoteaction. As we know code runs in system context and values in UTC time zone are retrieved. Is there anyway I can retrieve values in running user timezone?
PS: This is complex dymanic query and I can't use converttimezone etc here. Please don't mark duplicate.
Edit: After doing a lot of string manipulation in dynamic query I am getting the results using DAY_ONLY(convertTimezone(CreatedDate))
unfortunately it made things worst. I am getting results including 00:00:00 whereas I should be getting only date:
Status Changed On:2018-07-21 00:00:00
Why time handling is so limited in Salesforce, It would have been great if using with sharing should also do such changes as - timezone, currency etc..