Rebellion

Quick Question

5 posts in this topic

Just a quick query...does anyone know the format that the global command "serverTime" uses in Arma? Does it take a format of HH:MM:SS or 24 Hr style eg 1900 or 1236. I just need the format in order for something I'm trying to attempt on a server.

Share this post


Link to post
Share on other sites

serverTime, the time since the Server was actually started, is basically a value that is called to not set. Are you looking to format the output?

hint format ["Synced server time : %1", serverTime];

https://community.bistudio.com/wiki/serverTime

If you are wanting to set a specific date/time, you would probably want to use setDate, which sets the "mission" date and time.

setDate [1986, 2, 25, 16, 0];  //(4:00pm February 25, 1986)

https://community.bistudio.com/wiki/setDate

Edited by Kurewe

Share this post


Link to post
Share on other sites
Advertisement

I believe where you say serverTime returns the time since the server was started is done by "Time" (https://community.bistudio.com/wiki/time). If you check BIS Wiki: Time since server started whereas serverTime returns the actual time of the server. I dont want to set any time or date or anything like that as i know i can do that from exile_server_config. Im creating a script that is dependant on having the actual server time returned as a value, which is why I want to know the format this particular command returns it in.

I had already read the wiki which you quote the explanation in your reply. I dont need to format it or even display it in any particular way. What I actually want to do is use it as a means to sync an event to certain pre-defined times on my server hence why i need to know how the "output" it creates is returned so I know how to format the script to match it to the correct format.

Share this post


Link to post
Share on other sites

Actually, to be specific, while "time" does return time elapsed since mission started, the value is different on each client. If you need a constant serverside time, that's what serverTime gives. They both provide time elapsed since mission start, just from two different aspects.

In either case, I believe it provides the time in seconds. Easiest way to tell, is probably to type the command into a debug/admin console and see what it throws back you.

Another consideration might be diag_tickTime.
https://community.bistudio.com/wiki/diag_tickTime

 

Share this post


Link to post
Share on other sites

Yeah I think thats gonna have to be what Ill need to do. Though I believe it returns the time that is set on the server, particularly if the server is set to real time in config rather than static.

Edited by Rebellion

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.