From 28150b3b3ec7c83d52e46f51bf0bd6bd79aa7584 Mon Sep 17 00:00:00 2001 From: Henry Burgess Date: Tue, 2 Sep 2025 15:53:23 -0500 Subject: [PATCH 1/2] NST-29 Update timestamp format --- src/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 222c765..f864e93 100644 --- a/src/index.ts +++ b/src/index.ts @@ -218,10 +218,7 @@ const createBlock = ( } // Store the timestamp - const timestamp = new Date() - .toISOString() - .replace(/z|t/gi, " ") - .trim(); + const timestamp = Date.now(); jsPsych.data.addDataToLastTrial({ timestamp }); }, }, From 86693188c21f455e6d73a8cff559c168cd4b2e76 Mon Sep 17 00:00:00 2001 From: Henry Burgess Date: Tue, 2 Sep 2025 16:04:27 -0500 Subject: [PATCH 2/2] NST-29 Rename to `trialEndTime` --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index f864e93..3b5b69f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -217,9 +217,9 @@ const createBlock = ( data.wasRewarded = false; } - // Store the timestamp - const timestamp = Date.now(); - jsPsych.data.addDataToLastTrial({ timestamp }); + // Store the trial end time + const trialEndTime = Date.now(); + jsPsych.data.addDataToLastTrial({ trialEndTime }); }, }, {