All my servers post a time.GetUnixTimestamp() to a sql database, in a couple of my servers those are off by a few hours, i tried setting timezone in the OS, etc. but they are still off a bit, any ideas?
Unix timestamp different than OS time
Discussion in 'Rust Development' started by Rusty, Apr 29, 2016.
-
will do the current time of the server in format(00:00)Code:
DateTime.Now.ToString("h:mm tt") -
its the same plugin, it posts nix ts to sql, i own 14 servers, only 2 have the time off by a couple hours.
-
Oh, I cant be too sure then. Only time i've ever needed to use this was in QuarryLocks
-
thanks for trying, maybe Wulf can give me some insight.
-
Do they all have the same NTP Server?
-
time.GetUnixTimestamp should already provide the time in UTC, see Oxide/Time.cs at 97ef5efb94fa001e08481bcbfba3029051f8f8fe · OxideMod/Oxide · GitHub
It might be something wrong with the system time on your servers.
As Troubled mentioned, check NTP. -
same ntp server (time.nist.gov), same time, same time zone setting...baffling me. 2 servers out of 14.
-
Could you give us maybe an example?
-
On? the plugin? basically it just posts the current timestamp to a sql database, then i have a utility on my pc that monitors it, its for me to know howlong ago the server has pinged, to make sure its not down or crashed.
-
I mean an example of what is wrong. The timestamp.
-
Im actually dumb, time was off by 1 hour. Thanks anyway
-
So timezone was wrong?
-
no, the actual hour eh
