Real time after restart, how know?

hekut146

Well-Known Member
Me need know real time after restart, for localize restart messages, plz answer how? I found dll libriary for get real time pc to arma, but very bad working...
Code:
21:24:12 "call dll start"
21:24:12 "time:21:21"
21:24:12 "call dll end"
21:25:23 "call dll start"
21:25:23 "time:21:29"
21:25:23 "call dll end"
i try using this
Code:
_date ="ultima_kickall" callExtension "1";
//this get real time pc, but very bad working
and i try another 2 ways but none of them worked really well (get real time)
 
Last edited:
If you poke around, I am sure there is a child: call in hiveext.dll to get the time, otherwise the games time would not be able to be set to the same as server time.
Otherwise:
When your server starts. in the bat file, write the time to a file in your server folder.
in your restart.bat file put this line .. You need to know where you are writing this folder, the file path is used to read it. (test this in the cmd.exe prompt and you can see the output into a file).
time /T >> time.sqf

Now in your server_monitor.sqf when it restarts have this script. I am a bit fuzzy on how to use the path here as I have never done it, but some experimenting is in order. Use any old file and just look for the errors if the file isnt found until you figure out if there is anything special about reading in a text file.
_servertime = preprocessFile "\pathto\time.sqf";

Now your server knows what time it is on your server.


For reference, look at Denisios Linux dayz . He has an external script that reads the DB and writes to a file. And in server monitor he reads the files.
 
Last edited:
the second example is using extdb instead of the extension that dayz uses. .. exile mod for arma 3 uses extdb. So that is invalid unless you also load the extdb extension.

The first example, he is setting the hiveext.ini to local time. Then the dayz server "game time" is always the same as the "real server" time. He shouldnt have to use any child call in that case because game time is the same as real time.

Are you using epoch? in dayz_server\compiles\server_spawnevent.sqf is this code that says its getting time from the server using child:307

3DSmg7e.png
 
thx, i trying, but why you say @extDB addon (events already have in default epoch, and default epoch use hiveExt, not @extDB...)?
 
now work but not real time.. he write 10 hours...
Line 59455: 4:29:56 "time_server:[2016,4,1,10,29]"
Line 59462: 4:30:06 "time_server:[2016,4,1,10,30]"
in hiveconfig.ini 10 hours...
 
thx, i trying, but why you say @extDB addon (events already have in default epoch, and default epoch use hiveExt, not @extDB...)?
The second example you posted. That person was using "CALLEXTENSION" on the extDB addon. Hiveext.dll is just a library of functions. That person had installed extDB also for some reason.
clAWCEk.png


So, the child:307 gets the time from the server and has already applied the hiveext.ini time offset when it returns it to you. You will have to use what I suggested.
  1. In your restart .bat file, use time /T >> time.sqf
  2. In your dayz_server server_monitor.sqf read in the 'real' time from time.sqf using
    servertime = preprocessFile "time.sqf";
 
Back
Top