We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Timezone information is missing in the exported annotation file

Hi,

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

https://ej2.syncfusion.com/angular/demos/#/material/pdfviewer/annotations


Thanks


Attachment: annotationdateissue_eb2413d8.zip


10 Replies

CK Chinnamunia Karthik Chinna Thambi Syncfusion Team March 1, 2023 05:26 PM UTC

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.



SR Sriraman replied to Chinnamunia Karthik Chinna Thambi March 2, 2023 07:49 AM UTC

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.


Attachment: annotationdatetimeissue_a5203c05.zip



CK Chinnamunia Karthik Chinna Thambi Syncfusion Team March 3, 2023 12:10 PM UTC

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.


Angular sample:  https://stackblitz.com/edit/angular-2ftupq-42estx?file=src%2Findex.html,src%2Fapp.component.ts


Web service sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/WebApplication6.0-133255233.zip


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:


  • Run the web service sample.
  • And then run the angular sample.
  • Note the current time.
  • Add the annotations.
  • Export the annotation.
  • Note the time in the exported file which is in UTC format.


SR Sriraman replied to Chinnamunia Karthik Chinna Thambi March 8, 2023 01:46 PM UTC

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.

Thanks


Attachment: annotationdatetimeissue3_950b57d9.zip


CK Chinnamunia Karthik Chinna Thambi Syncfusion Team March 9, 2023 11:37 AM UTC

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.


Angular sample: https://stackblitz.com/edit/angular-no399r-u2cps6?file=src%2Fapp.component.html,src%2Findex.html


Web service sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ControllerSample20.4.53867915730.zip


Steps to run the sample:


  • Run the web service sample.
  • And then run the angular 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.



SR Sriraman replied to Chinnamunia Karthik Chinna Thambi March 19, 2023 03:05 PM UTC

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?



CK Chinnamunia Karthik Chinna Thambi Syncfusion Team March 20, 2023 01:06 PM UTC

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.



CK Chinnamunia Karthik Chinna Thambi Syncfusion Team March 24, 2023 04:38 PM UTC

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.


Feedback link: Modified time is not proper in the comment panel while importing the annotation using Azure app service | Issue Feedback


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."



CK Chinnamunia Karthik Chinna Thambi Syncfusion Team April 12, 2023 10:44 AM UTC

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.



CK Chinnamunia Karthik Chinna Thambi Syncfusion Team April 19, 2023 07:46 AM UTC

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.

 

Packages:   

 

CDN Links:

https://cdn.syncfusion.com/ej2/21.1.41/dist/ej2.min.js

https://cdn.syncfusion.com/ej2/21.1.41/material.css


Loader.
Live Chat Icon For mobile
Up arrow icon