Naco88
|
  |
| Joined: 30 Oct 2009 |
| Total Posts: 665 |
|
|
| 22 Jun 2017 08:48 AM |
will this time script display the time in the same time zone every time the game is played? I just heard rumors before it it being a different time zone each time.
local time_zone = -5 -- Time zone, offset from GMT. local hour24 = false -- Use 24-hour clock.
local secondsInDay = 60*60*24
while true do local tick = math.fmod(tick(),secondsInDay)
local hour = math.floor(tick/3600) + 5 + time_zone local minute = math.floor(tick/60 - 60*hour) local second = math.floor(math.fmod(tick,60))
if (not hour24) and (hour > 12) then hour = hour - 12 end
print("Hour: "..hour.." Minute: "..minute) wait(1) end
|
|
|
| Report Abuse |
|
AIicks
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 788 |
|
|
| 22 Jun 2017 08:51 AM |
tick() uses the local timezone. Whether that be on the client or on the server
os.time() uses a specific timezone I believe. |
|
|
| Report Abuse |
|
| |