Ejiy / jl-laptop

Laptop script for fivem, that has boosting, darkweb, and bennys shop apps
https://justlazzy.gitbook.io/home/free-resources/jl-laptop
GNU Lesser General Public License v2.1
106 stars 65 forks source link

Invalid Date Issue - Boosting [v1.0.0][Windows] #51

Open MindlessPuppetz opened 1 year ago

MindlessPuppetz commented 1 year ago

Just grabbed the latest release, saw that there were some time fixes pushed already but I am currently getting the following when I join queue on the boosting.

Expires: Invalid date

This shows on all contracts in my queue after updating. No client or server errors posted (although there is a TypeError being posted now that I grabbed screenshots and noticed it). It is running on a windows pc and linux config setting is set to false.

https://cdn.puppetzmedia.com/FPhMd7LC.png https://cdn.puppetzmedia.com/UfRaRGCX.png https://cdn.puppetzmedia.com/DQMShYBQ.png

redacid95 commented 1 year ago

I have touched a lot of stuff with this resource to fix all the bugs. I can't be for sure this was the only change required, but one big issue is the data and time format that moment.js requires.

@Ejiy

in server/boosting.lua

Change "GetHoursFromNow" and "GetCurrentTime" formats to

os.date("%Y-%m-%d %H:%M", os.time() + (hours * 3600))

and

os.date("%Y-%m-%d %H:%M", os.time())

maguhd commented 1 year ago

I have touched a lot of stuff with this resource to fix all the bugs. I can't be for sure this was the only change required, but one big issue is the data and time format that moment.js requires.

@Ejiy

in server/boosting.lua

Change "GetHoursFromNow" and "GetCurrentTime" formats to

os.date("%Y-%m-%d %H:%M", os.time() + (hours * 3600))

and

os.date("%Y-%m-%d %H:%M", os.time())

this fixed it for me. Thank you!