JS SDK database type BIGINT
Hi all,
what i want to do is to store the datetime as timestamp inside the db, like mentioned here in this post: https://forum.innovaphone.com/moodle2/mod/forum/discuss.php?d=26807
My problem is that i cannot read out the value correctly to use it on js side, inside the config.json file we have a column "BIGINT DEFAULT EXTRACT(EPOCH FROM now()) * 1000" and a second time value column "BIGINT NOT NULL". Both are written correctly (second value written from source code). But "Select *" on that table, returns only negative values. Looks like the JS part handles the BIGINT value from DB as a "integer" value (https://www.postgresql.org/docs/9.1/datatype-numeric.html). Values bigger than "2147483647" are not converted correctly, so i could store seconds until 1/19/2038, 4:14:07 AM.
Both time values in config.json were first "BIGSERAL", and set later to BIGINT. I tried to delete the corresponding table, same behaviour. (Trying to delete the Database from pgadmin it tells me that there are open sessions to my apps database and deleting the db is canceled. Have canceled this attempt for now.)
Has anyone had similar experiences? What am i doing wrong?
Best regards
Mladen