ID:119559
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Suggestions:

- 1; Change time2text() to have a gmt value retrieved from world.gmt or client.gmt, or, add client.timeofday to do what world.timeofday does for the client. (Stevenw9)

- 2; Allow the retrieval of time from BYOND's webserver or another source through a variable such as world.ByondTime. Sync at run-time. (Falacy)

Useful for any project using and/or manipulating time.
So, basically, you want a client.timeofday variable?
Falacy wrote:
So, basically, you want a client.timeofday variable?

No. Time of day returns a GMT 0 statement. I want it to stay just like that. What I want is a way to know a clients timezone (IE GMT-5) and be able to use it. BYOND does this for the server but not the client within time2text.
No, it doesn't. world.timeofday != -5. BYOND time is based on the host's date/time settings. There is no magical clock that hooks into a true GMT time and returns a timezone in any way. I'm not even sure what you were on about to begin with, and I'm even more unsure now. How is knowing that somebody is in a -5 timezone going to be useful? Especially if you don't have a legitimate base timeline to compare it to? client.timeofday would allow you to use time2text() exactly as it is now, but to display times based on the client's machine instead of the server's...
Falacy wrote:
No, it doesn't. world.timeofday != -5. BYOND time is based on the host's date/time settings. There is no magical clock that hooks into a true GMT time and returns a timezone in any way. I'm not even sure what you were on about to begin with, and I'm even more unsure now. How is knowing that somebody is in a -5 timezone going to be useful? Especially if you don't have a legitimate base timeline to compare it to. client.timeofday would allow you to use time2text() exactly as it is now, but to display times based on the client's machine instead of the server's...

You're misreading me. timeofday reports a GMT of 0, not -5. time2text() is the one that does the calculation of the servers timezone (which in my case is -5), and then manipulates timeofday to match it. What I want is a way to tell time2text to use the world's timezone, the client's timezone, or neither. Rather than only the world's.

Hence the suggestion of world.gmt and client.gmt.

P.S. Did you even fully read my suggestion? I feel like you didn't, or else you would have seen this.
timeofday reports the number of ticks since a certain date, the fact that its GMT time is almost completely irrelevant.

time2text simply converts that number (at this time about 739350) into a humanly readable date format. It doesn't do anything to the provided time var, or even require an actual variable, you can input the aforementioned 739350 directly into time2text() and get the same time as world.timeofday at that point. If I host a server, and you host a server (assuming we're in different time zones) the time2text proc will display our local date/times.

This is also in no way effectively reading the server's actual time zone, simply the time they have their computer's clock set to. Change that little clock in the bottom right of your screen, watch the BYOND date/time magics.

Stevenw9 wrote:
P.S. Did you even fully read my suggestion? I feel like you didn't, or else you would have seen this.
I read it. It was overly wordy, confusing, and seemed to be side stepping the actual issue.
Falacy wrote:
timeofday reports the number of ticks since a certain date, the fact that its GMT time is almost completely irrelevant.
time2text simply converts that number (at this time about 739350) into a humanly readable date format. It doesn't do anything to the provided time var, or even require an actual variable, you can input the aforementioned 739350 directly into time2text() and get the same time as world.timeofday at that point.
This is also in no way effectively reading the server's actual time zone, simply the time they have their computer's clock set to. Change that little clock in the bottom right of your screen, watch the BYOND date/time magics.
Stevenw9 wrote:
P.S. Did you even fully read my suggestion? I feel like you didn't, or else you would have seen this.
I read it. It was overly wordy, confusing, and seemed to be side stepping the actual issue.

So it goes based on the hosts clock, not their timezone. Okay, then give me a way to go by the clients clock. :P
I'm also really confused since the reference says it gets a time with no positive or negative GMT value and then adjusts it.
While we're at it, I'd like world.byondTime. As it is now, hosts can easily edit their system clock to perform malicious time-restricted activities. Current methods also vary time-zones between servers. world.byondTime could pull a globally consistent time from the website or something.
Falacy wrote:
While we're at it, I'd like world.byondTime. As it is now, hosts can easily edit their system clock to perform malicious time-restricted activities. Current methods also vary time-zones between servers. world.byondTime could pull a globally consistent time from the website or something.

I'm unsure about the specific situations you're talking about. I haven't run into a problem with servers having different times. Yet.
If one server is hosted on the east coast, and another on the west coast, their time-zones will be 3 hours apart, using when time2text() with world.timeofday. There is no way to correct for this as far as I know, or to even pull a legitimate date/time through BYOND.

If you put some sort of date based restriction on game-play, using timeofday (say you can only go fishing once per hour/day/month) all the host has to do is change their system clock and it will negate such restrictions.
Falacy wrote:
If one server is hosted on the east coast, and another on the west coast, their time-zones will be 3 hours apart, using when time2text() with world.timeofday. There is no way to correct for this as far as I know, or to even pull a legitimate date/time through BYOND.
If you put some sort of date based restriction on game-play, using timeofday (say you can only go fishing once per hour/day/month) all the host has to do is change their system clock and it will negate such restrictions.

I see. Personally I want whatever the MMO's are doing. Having accurate server -and- client times is pretty important to me. Let's mesh ideas?