From 0a931a98e1092789fc48a7d29c82c23bde21be79 Mon Sep 17 00:00:00 2001 From: Daniel DeMicco Date: Fri, 7 Dec 2018 13:27:27 -0800 Subject: [PATCH] Fix: date appears incorrectly for point annotations in IE11 --- src/AnnotationThread.js | 2 +- src/controllers/DrawingModeController.js | 2 +- src/controllers/PointModeController.js | 2 +- src/doc/DocAnnotator.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AnnotationThread.js b/src/AnnotationThread.js index d07a9ac2c..a970a8576 100644 --- a/src/AnnotationThread.js +++ b/src/AnnotationThread.js @@ -248,7 +248,7 @@ class AnnotationThread extends EventEmitter { can_delete: true }, createdBy: this.api.user, - createdAt: new Date().toLocaleString() + createdAt: new Date().toISOString() }); this.state = STATES.inactive; diff --git a/src/controllers/DrawingModeController.js b/src/controllers/DrawingModeController.js index e56a000b6..57bd35728 100644 --- a/src/controllers/DrawingModeController.js +++ b/src/controllers/DrawingModeController.js @@ -212,7 +212,7 @@ class DrawingModeController extends AnnotationModeController { canAnnotate: true, canDelete: true, createdBy: this.api.user, - createdAt: new Date().toLocaleString(), + createdAt: new Date().toISOString(), isPending: true, comments: [] }); diff --git a/src/controllers/PointModeController.js b/src/controllers/PointModeController.js index 7e16ff651..d37a0da6e 100644 --- a/src/controllers/PointModeController.js +++ b/src/controllers/PointModeController.js @@ -120,7 +120,7 @@ class PointModeController extends AnnotationModeController { canAnnotate: true, canDelete: true, createdBy: this.api.user, - createdAt: new Date().toLocaleString(), + createdAt: new Date().toISOString(), isPending: true, comments: [] }); diff --git a/src/doc/DocAnnotator.js b/src/doc/DocAnnotator.js index 99c23f354..d589db7b6 100644 --- a/src/doc/DocAnnotator.js +++ b/src/doc/DocAnnotator.js @@ -513,7 +513,7 @@ class DocAnnotator extends Annotator { canAnnotate: true, canDelete: true, createdBy: this.api.user, - createdAt: new Date().toLocaleString() + createdAt: new Date().toISOString() }); if (!thread) { this.handleValidationError();