cookie date time fix

The cookie is storing date time attributes in UTC causing an exception in heritage code when it hits the comma separating parts of the string.  ie:  SavedSessionTimeoutDate":"Mon, 20 Jan 2025 15:31:51 GMT"
This commit is contained in:
CarlNation 2024-12-06 10:33:05 -05:00
parent 3f198227d0
commit 2ae25e6bd0
2 changed files with 2 additions and 2 deletions

View file

@ -13,7 +13,7 @@ export function updateOrCreateFunnelCookie() {
// Set up cookie with all the props.
setFunnelCookieProperties({
LastTouched: new Date().toUTCString(),
LastTouched: new Date().toJSON(),
SavedSessionTimeoutDate: store.getters.applicationUser.savedSessionTimeout,
DidHeritageFunnelUpdateLast: false,
ShouldResetState: false,

View file

@ -43,5 +43,5 @@ Function to calculate the date for the saved session timeout.
export function getDateForSavedSessionTimeout() {
const currentDate = new Date(new Date().toUTCString());
currentDate.setDate(currentDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS);
return currentDate.toUTCString();
return currentDate.toJSON();
}