esx-framework / esx_core

Official Repo For core resources for esx-legacy
https://documentation.esx-framework.org/
GNU General Public License v3.0
363 stars 734 forks source link

[Bug] - esx_script - Issue #1391

Open Deathdomain opened 3 weeks ago

Deathdomain commented 3 weeks ago

Date of Birth is always -1 day for me I.E put 12/10/1967 i get 12/09/1967

only way i can say to make it happen would be to try to make a character and see yourself with the current core

Debug Info (please complete the following information):

Additional context its really only off by one day, not a huge deal but it does break the RP if someone doesnt and says the wrong birthday

Deathdomain commented 3 weeks ago

i keep checking back to see if yall going to tell me i did something wrong maybe lol

Gellipapa commented 3 weeks ago

Hi! DB level it's works perfectly. Can you show me your db record?

Image

Deathdomain commented 3 weeks ago

would that just be showing you my DOB or what exactly do u need

Deathdomain commented 3 weeks ago

https://go.screenpal.com/watch/cZjOYlVRVjF?_gl=1*1jlujym*_ga*MTk1OTgwODM1LjE3MjQ2MTk2NzI.*_ga_J7G603GGVL*MTcyNDcwMjk4NC4zLjAuMTcyNDcwMzE2MC4wLjAuMA..

is a video of my making a character and showing the -1 DOB

Deathdomain commented 3 weeks ago

image

Gellipapa commented 3 weeks ago

Hi! Interesting you should use latest version esx identity and it's works.

Deathdomain commented 3 weeks ago

Hi! Interesting you should use latest version esx identity and it's works.

it doesnt. i have ran through the whole test in the discord before reporting it here, including reinstalling all of the core

Deathdomain commented 3 weeks ago

https://discord.com/channels/513374574394474531/1277339650456813618

Deathdomain commented 3 weeks ago

just did a reinstall of a fresh esx_indentify and still dont get correct entered date

Gellipapa commented 3 weeks ago

@Deathdomain Hi! It is probably because of the time zone that you have this discrepancy.

SELECT @@global.time_zone, @@session.time_zone;

Run this mysql command and send me what you get back. If it says "SYSTEM" then the time zone where your system is running is the time zone your MYSQL server is using.

SET time_zone = '+00:00'; You can use this SQL command to set your timezone in that session to see if it solves your problem.

Deathdomain commented 3 weeks ago

image image it still didnt work sadly, looks like that set timezone didnt even do anything

Gellipapa commented 3 weeks ago

@Deathdomain Hi! It's 100% time zone problem, check your server timezone and try to set any valid UTC time. (My zone for test : GMT+2)

Deathdomain commented 3 weeks ago

UTC time

Look at what i said, its NOT working

Deathdomain commented 3 weeks ago

i tried the command you told me to execute and it looks like it didn't even work, let alone change me from SYSTEM when doing SELECT @@global.time_zone, @@session.time_zone; again

Deathdomain commented 3 weeks ago

@Gellipapa

Deathdomain commented 3 weeks ago

GMT-04:00 which is Eastern Timezone. i have tried that with SET time_zone = '-04:00'; which came back with a empty response

Deathdomain commented 3 weeks ago

Image

jtmcraft commented 3 weeks ago

fwiw, if you're using a hosting company, and their customer support is decent, they might be happy to set it for you. Also, with hosting companies, I've seen it happen where setting time_zone in a server startup script works while setting it in a client like phpmyadmin does not.

Gellipapa commented 3 weeks ago

@Deathdomain Hi! I only described one option, I don't know what your solution will be. You have to manage to be in a time zone where there is no time difference, if you can manage that it will work.

Watch the video on how to set the time zone on your computer or server machine.

I'm closing issue because this is not an ESX problem but a specific problem.

Deathdomain commented 2 weeks ago

-.- this isnt a me issue

Gellipapa commented 2 weeks ago

-.- this isnt a me issue

esx_identity-test-utc-manual-parse-date.zip

I made you a manual parse date which will probably work for you too. Test it and let me know if it works. You just need to copy the script.js file in your version, although I'd prefer it if you copied the version I sent you one by one and tried that.

@Deathdomain

Gellipapa commented 4 days ago

@Deathdomain Hi! Did you try what I sent you? Did it solve your problem?

Deathdomain commented 2 days ago

@Deathdomain Hi! Did you try what I sent you? Did it solve your problem?

no it hasnt worked, sorry i lost track of this thread. i did exactly what you said and replaced the script.js and it didnt change anything

Deathdomain commented 2 days ago

well replace the esx_identity with the one u sent and used my script.js

Gellipapa commented 2 days ago

Hi! @Deathdomain Interesting then I don't know what your problem might be because now in JS it is independent of what time zone you are in that the date value will be correct.

Either you haven't restarted the server or you are using some modified esx_identity, or some other identity is overwriting the date or some script is overwriting the date.

I don't know what your problem is, but it's interesting because no one else has reported it, and there must be other users in your timezone.

This must be a very specific case. Until we can reproduce it, we can't fix the problem.