Merge pull request #2160 from Safelite/feature/cookieDebug
cookie date time fix
This commit is contained in:
commit
ee2fd611b3
3 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ describe("getDateForSavedSessionTimeout", () => {
|
|||
currentDate.setDate(currentDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS);
|
||||
|
||||
// Act
|
||||
const result = getDateForSavedSessionTimeout();
|
||||
const result = new Date(getDateForSavedSessionTimeout()).toUTCString();
|
||||
|
||||
// Assert
|
||||
expect(result).toEqual(currentDate.toUTCString());
|
||||
|
|
|
|||
Loading…
Reference in a new issue