ReturnOfTheUTMZ icon indicating copy to clipboard operation
ReturnOfTheUTMZ copied to clipboard

Cookie timestamp is not real

Open clancychilds opened this issue 11 years ago • 2 comments

To get 0.0.1 done, I made the timestamp in the cookie to default to 1234567890 rather than the actual timestamp. Would be better if it defaulted to the time stamp of when it was created.

clancychilds avatar Mar 29 '15 14:03 clancychilds

Is this as straightforward as adding what's below to UTMZCookie(), or am I missing something crucial about how this particular timestamp needs to be generated?

if (!Date.now) Date.now = function() { return new Date().getTime(); };
this.timestamp = Date.now() / 1000 | 0;

If this is what you're after, I'll make a pull request.

CVM avatar May 06 '15 12:05 CVM

It might be as simple as that. I just cheated when originally putting this together. Please put in a PR and I'll take a look. On May 6, 2015 8:07 AM, "Chris Martin" [email protected] wrote:

Is this as straightforward as adding what's below to UTMZCookie(), or am I missing something crucial about how this particular timestamp needs to be generated?

if (!Date.now) Date.now = function() { return new Date().getTime(); };this.timestamp = Date.now() / 1000 | 0;

If this is what you're after, I'll make a pull request.

— Reply to this email directly or view it on GitHub https://github.com/clancychilds/ReturnOfTheUTMZ/issues/1#issuecomment-99425927 .

clancychilds avatar May 06 '15 13:05 clancychilds