Os.time() is not synced across Roblox servers

  • Describe the bug. Describe what is happening when the bug occurs. Describe what you would normally expect to occur.
    os.time is not synced across all Roblox servers. This makes using the API useless because it is unreliable.

  • How often does the bug happen (Everytime/sometimes/rarely)? What are the steps that reproduce the bug? Please list them in very high detail. Provide simple example places that exhibit the bug and provide description of what you believe should be the behavior.
    This bug is happening every time.

  • When did the bug start happening? If we can tie it to a specific release that helps us figure out what we broke.
    Our earliest report of this was February 5th.

  • Would a screenshot or video help describe it to someone? If so, post one.

    I tried to run both print statements at the same time on different servers but I’m typically 1-2 seconds slow. Regardless, these are the results from my test. I would estimate each server to be within 1-100 seconds out of sync with the correct time. This has lead to us removing daily rewards system from our games because players are able to infinitely collect them if they rejoin quick enough after claiming the reward.


Syncing the time on all servers
OS Time Sync Across All Servers
How would I make a countdown

Can confirm. We’ve seen servers as much as 3-5 minutes out of sync. It caused serious issues in Vesteria when we were trying to store player data across teleports. Players would find a server that’s behind once in a blue moon and then drop items there and teleport back to a newer server, and the game wouldn’t recognize that save as their newest one because the server’s clock was off. They were able to duplicate super rare items because of this.

We ended up switching to incremental version numbers for player data and it fixed the problem, but yeah it’s pretty messed up that server time can vary so wildly.

(@Kampfkarren might want to look into switching DataStore2 over to an incremental version number (just add 1 to every save instead of using os.time()) to avoid issues with this timestamp inconsistency)



This has been happening since late december-early january, every server i join is usually minutes apart from the last, and at worst they’re hours apart. They’ve also been drifting further since then, as the problem has only gotten worse


24 Hour System. "os.time()"

If it isn’t possible to have accurate os.time synced across servers, then this must be documented on the wiki. This undocumented issue (or bug, if it is one) caused @berezaa and me weeks of headache.



Thanks for the report. We’re actively working towards a fix for this.



I assume this also affects tick()? I don’t know how tick works compared to os.time() aside from that it includes a decimal value.

I’ve also noticed desyncs between tick() and os.time(). I have a daylight script that uses formatting in os.time() to get UTC Epoch and tick() to get a decimal value for the time, adding these two together for an epoch relative to UTC + milliseconds. This suffers issues where tick() will move to the next second before os.time() resulting in the sun jutting backwards while os.time() is still one second behind, and the decimal value for tick() is near zero due to being on the next second.

If it helps to visualize this problem, here’s the output of time from the script:

1550289678.9726 --Counting...
1550289678.9886 --Counting...
1550289678.0063 --tick() rolled over, os.time is behind by one second
1550289678.0225 --os.time still catching up
1550289679.0394 --os.time finally moved over to the next second


I don’t think they are supposed to be synced. os.time() is unix time while tick() is based off of system time.

os.time() Returns how many seconds have elapsed since the UNIX epoch (1 January 1970, 00:00:00), under UTC time.

tick() Returns the amount of time in seconds since the UNIX epoch (January 1st, 1970) on the current local session’s computer. It is precise to the nearest millisecond (0.001s).



Any word on the status of this issue?



I made a quick synchronization script so that you’d be unaffected by this issue.

--this module will sync the time() function with google's time. will block on first load so it can sync the time

local module = {}
local httpServ = game:GetService("HttpService")
local reqAsync = httpServ.RequestAsync
local months = {Jan=1,Feb=2,Mar=3,Apr=4,May=5,Jun=6,Jul=7,Aug=8,Sep=9,Oct=10,Nov=11,Dec=12}
local offset = 0

module.time = function()
	return os.time() + offset

function updateTime()
	local succ, resp = pcall(reqAsync, httpServ, {Url="https://google.com"})
	if succ and resp.Success and resp.Headers.date then
		local day,month,year,hour,min,sec,tz = resp.Headers.date:match("%a+, (%d+) (%a+) (%d+) (%d+):(%d+):(%d+) (%a+)")
		if day and month and hour and min and sec and tz then
			succ, resp = pcall(os.time, {day=day,month=months[month],year=year,hour=hour,min=min,sec=sec,tz=tz})
			if succ then
				offset = resp-os.time()
				--this should never happen unless google goes away
				if module.onError then 
			--this should never happen unless google goes away
			if module.onError then 
		--google is down or we're blocked or something
		if module.onError then 

delay(30, updateTime)

return module

How would I make a countdown

Do you know if google’s response date/time will change depending on the timezone the server computer is in?

1 Like


The date header is in UTC, so it is unaffected by timezones.

1 Like


Oops, I didn’t know about that. Perfect thanks!



Actually, I’m completely wrong. The timezone could be anything, but converting that to unix standard time would result in the same time regardless of the timezone.

1 Like