[Greasemonkey] Storing large integers with GM_setValue overflows?
Aaron Boodman
zboogs at gmail.com
Wed Jun 29 11:23:48 EDT 2005
so, you're doing like:
GM_setValue("foo", new Date().getTime()) ?
Yeah, I would image that should definitely work. If it isn't perhaps
some underlying limitation on the XPCOM preferences object (which
would suck).
File a bug please, and as a workaround:
GM_setValue("foo", new Date().getTime() + "");
parseInt(GM_getValue("foo", 0));
--
Aaron
On 6/29/05, Matthias Bauer <ml-greasemonkey-42imk83y at moeffju.net> wrote:
> Hi all,
>
> I'm storing a timestamp (Date.getTime()) with GM_setValue, but when I
> read the value back, it's overflowed to about -900000000, when it should
> be something like 1120065286250.
>
> Storing the value as string would probably solve the issue, but still,
> should this happen? Is it a known bug?
>
> -Matt
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
More information about the Greasemonkey
mailing list