When you export the annotation file in JSON format, the timezone information is missing in modified date property. The time is captured in user's local time. but timezone information is not captured. It should either capture with timezone information or should be captured in UTC time. So that we can have the accurate data.
Please refer the attachments. The annotations were exported from the demo page
We consider the time in UTC format. All the values that are exported as JSON or XFDF will be in UTC format. On loading or while importing, UTC format will be converted into the current machine culture to display the format in the viewer as per the time zone chosen in the machine.
No. The date/time exported to JSON shows in user's local time (i.e., not in UTC). Please refer the attached video. I am in IST timezone. I am adding an annotation. You can see that the date/time in the UI matches my local time. Also, the same is present in the exported JSON file.
The expectation is date/time shown in the UI should be in user's local timezone and the date/time present in the JSON should be in UTC.
Let me know if there are any queries.
We have implemented this in our latest version. We suspect that you are using the Syncfusion demo URL ( "https://ej2services.syncfusion.com/production/web-services/api/pdfviewer") where the changes is not reflected in the demo URL. So, we recommended to use your own web service to avoid this issue. We have shared a web service sample and the documentation link on how to create the web service, for your reference.
Documentation link for how to create a web service: https://www.syncfusion.com/kb/11063/how-to-create-pdf-viewer-web-service-in-net-core-3-0-and-above#:~:text=ASP.NET%20Core%203.0%20application,the%20Visual%20Studio%20menu%20bar
Steps to run the sample:
Ok. I can see that the timezone information is added in JSON/XFDF file. However, when you import the file again, it is showing the date/time incorrectly in UI. Please refer the attached video.
The reported issue is reproduced in the demo and it is fixed in the latest version. We have shared the sample in our latest version. Kindly try this and let us know if you have any concerns on this.
Steps to run the sample:
Note: We update the demo page only in SP Release and Main releases. But the issue is fixed in the weekly release. So, the fix is not updated in our demo page. We will update the demo page in our upcoming Volume 1, 2023 Main release expected to be rolled out in the end of March 2023.
It works fine in my local dev environment. However, when I deploy my application in Azure App services, the date time is calculated incorrectly. Please note that, the azure app services is running UTC timezone and I am accessing from IST. It saves the users local date/time as UTC as per the xfdf file.
Can you please verify?
We were able to reproduce the reported scenario “Time is not proper in the comment panel in azure app service while importing”. We need some more time to investigate and will provide further details on March 22, 2023.
We have confirmed the issue "Modified time is not proper in the comment panel while importing the annotation using Azure app service" and logged it as a defect. The fix for the issue will be available in our upcoming weekly NuGet release on April 12, 2023. You can track the status of the issue through the following link.
Disclaimer: "Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization."
Sorry for the inconvenience. The fix for the reported issue was not included in our latest weekly release. However, it will be included in our upcoming weekly release on April 19, 2023.
We have fixed the reported issue "Modified time is not proper in the comment panel while importing the annotation using Azure app service" and the fix for the reported issue was included in our latest weekly release v21.1.41. Kindly upgrade to that version to get the issue resolved.
Service side package
ASP.NET Core :