I am working on a SharePoint online site collection which have this regional settings:-
And i have a SharePoint column of type Date/Time, now inside SharePoint list view the date/time will be show as follow:-
which respect the site regional settings. now for the above site column >> i have a managed property and when i am showing this manage property inside the PnP Modern Search Result web part i will get the value based on UTC, as follow: -
so how i can show the date/time inside my Search Result to be equal to what is shown inside the list view?
Here is how i am rendering the column value inside the Search Result web part settings (resource.fields.RefinableDate01):-
EDIT
I tired the solution mentioned in this link @ https://spdcp.com/2019/12/21/local-time-zones-for-pnp-modern-search-web-part/.... Where i tried this formula:-
{{ getDate (getDate (slot item @root.slots.PUETA "YYYY-MM-DDTHH:mm:ss.0000000\Z") "ddd, MMM DD h:mm a" 3 }}
And I defined 3 to get the time zone of the current web, as per the documentation:-
but still there are differences, here are the actual date/time inside the list view:-
and here is how they are shown using the above expression/formula inside the PnP Modern search web part:-
so still there are those differences: -
21 August 2024 11 PM >>>>>>>> 22 August 2024 1 am 21 August 2023 10 PM >>>>>>>> 22 August 2023 12 am
so the gap get minimized, but still there are 2 hours differences .. any advice? can this be fixed?