Jump to content

Cvar CurrentServerTime


Flux

Recommended Posts

Hi everyone!

I'm hosting a 7D2D Server i am currently stuck with this issue and hope you can help me out.

 

I try to calculate the "CurrentServerTime" to a readable format.

Any ideas how i can solve this?

 

My Settings:

  •     DayNightLength: 120 <!-- real time minutes per in game day: 60 minutes -->
  •     DayLightLength: 18  <!-- in game hours the sun shines per day: 18 hours day light per in game day -->

 

Thanks in advance

 

Edited by Flux (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

 

My question from first post was probably not completely understandable.

Sorry for that.

 

I mean the Dateformat from Parameter "CurrentServerTime".

 
Ex:
I change the Serverconfig in "sdtdserver.xml" to this:
<!--  -->
<property name="DayNightLength"       value="60" />                <!-- real time minutes per in game day: 60 minutes -->
<property name="DayLightLength"       value="18" />                <!-- in game hours the sun shines per day: 18 hours day light per in game day -->

 

 

My Server-Query-Script show me this:

spacer.png

 

 

Ingame: Day 99 (Monday), 15:56

 

How can i calculate the "CurrentServerTime" to a readable format?

 

Edited by Flux (see edit history)
Link to comment
Share on other sites

3 hours ago, SylenThunder said:

I'm curious what isn't readable.  Are you not familiar with how a 24-hour clock works?

Yes i am :)

I posted the day and time to possibly find the connection to the "CurrentServerTime"  (2367943) Gameserver-Variable.

I share a picture from gameserver query-script  to show you the "CurrentServerTime" String. (Post #4)

 

2 hours ago, Kers said:

1 day have 86400 seconds

 

CurrentServerTime says: 2367943

 

so... 2367943 / 86400 = 27,40

 

but we have day 99 3:56 pm... how calculate the game the ingame time with the CurrentServerTime string?

 

Exactly what i wanted to ask.

 

Edited by Flux (see edit history)
Link to comment
Share on other sites

Ahh, your previous image didn't come through, so I thought the output you were getting was literally similar to "Day 99, 15:56".

 

If I had to guess I would think that value is based on ticks, but it could also be the current uptime, and doesn't have anything to do with the day count. Or maybe it's just a String value for the A2S_INFO or A2S_RULES response. https://developer.valvesoftware.com/wiki/Server_queries 

Link to comment
Share on other sites

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
×
×
  • Create New...