The script has “os.date(”%a %B, %d %I:%M %p",os.time()-14400)" But I have no clue how to get it to work with Daylight Savings, it is currently on Standard Time, and I have no clue how to fix it.
Could any of yall on here help me?
The script has “os.date(”%a %B, %d %I:%M %p",os.time()-14400)" But I have no clue how to get it to work with Daylight Savings, it is currently on Standard Time, and I have no clue how to fix it.
Could any of yall on here help me?
The os library has been sandboxed to the point where its only real use is with script benchmarking or using the clients system time. The time of that script should change with the client’s system time, and most computer’s automatically update with the daylight savings time. One thing I’m not sure that you are aware of is, the script is returning the time from four hours ago. To get the current time you can use:
os.date("%a %B, %d %I:%M %p")
However, what I said above about the function returning the clients system time is only true if you are running the script in a LocalScript | Roblox Creator Documentation. If you are using it in a Script | Roblox Creator Documentation object then means that the code is being run on a Roblox server in-game. If I recall correctly, I believe that Roblox’s servers all use Standard time, regardless of their location. This could be the cause of your trouble. If you want to use the players local time run the slightly edited line of code provided above.
P.S. - If you don’t have not learnt the difference between the client and server or do not understand how the two interact you can read the Client-Server Model | Roblox Creator Documentation article. Some other articles to you may find useful are Bindable Events and Functions | Roblox Creator Documentation for client-server communication or Network Ownership | Roblox Creator Documentation for whether the client or server is calculating the physics of an assembly.
No, you couldn’t. Roblox does not provide developers with the time zone a player (client) is in, so it’s impossible to get information about that time zone and, therefore, whether or not that timezone uses Daylight Savings Time. You can do your best to estimate their time zone by comparing the client time with the server time (client time offset from standard time), but even then it’s not a reliable method.