ID:161111
Jun 17 2008, 4:31 am
|
|
Just a quick question, does 'timeofday' come from the computer/host time? or an external source through BYOND (like a time server?). Im slightly confused, thanks.
|
In response to Lummox JR
|
|
Hmmm how come my system clock is @ 4:31 PM and the games (from timeofday) time is saying 11:31 AM. It should be the same right?
Here is the time code, it was given to me by a friend i didnt write it personally. proc/FindGameTime() |
In response to UnknownDuelist
|
|
Because you're horridly over-complicating the process. Take a gander at the time2text() proc, it'll allow you to easily get the hours, minutes, and seconds of any given time value without having to manually parse it yourself.
|
In response to Nadrew
|
|
Oh ok. I shall look into that then, thanks.
And yeah, it seems the code i was given is calibrated to US time XD so its always 6hrs+ the time of the host heh. |
In response to UnknownDuelist
|
|
As a side note, there is no such thing as "US Time".
There's many different time zones in the US, Canada and other countries, such as Eastern, Pacific, Newfoundland (that is a weird timezone value in my opinion), Nuku'alofa, etc. |
In response to UnknownDuelist
|
|
timeofday is reported at UTC. The code subtracts 4 hours from the time reported, so it identifies itself as being at UTC-0400 (EDT).
|
In response to Nadrew
|
|
Nadrew wrote:
Because you're horridly over-complicating the process. Take a gander at the time2text() proc, it'll allow you to easily get the hours, minutes, and seconds of any given time value without having to manually parse it yourself. If you are say in the Eastern Time zone, you might expect time2text(36000,"hh") to display "01", but it will instead display "21". You need to take time zones into account if you're going to use it that way, which may get complicated if there is the possibility of people in different time zones using it. He has the right idea using modulo to display the information. |
world.realtime and world.timeofday both come from the host's clock.
Lummox JR