Flux Posted January 6, 2022 Share Posted January 6, 2022 (edited) 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 January 6, 2022 by Flux (see edit history) Link to comment Share on other sites More sharing options...
Flux Posted January 23, 2022 Author Share Posted January 23, 2022 No Members, Mod's or DEV's know about this Parameter? Link to comment Share on other sites More sharing options...
SylenThunder Posted January 23, 2022 Share Posted January 23, 2022 Curious, exactly what it it you are trying to accomplish. Your settings are for 120 minute days with 18 hours of daylight. What about that isn't readable? Link to comment Share on other sites More sharing options...
Flux Posted January 23, 2022 Author Share Posted January 23, 2022 (edited) 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: Ingame: Day 99 (Monday), 15:56 How can i calculate the "CurrentServerTime" to a readable format? Edited January 23, 2022 by Flux (see edit history) Link to comment Share on other sites More sharing options...
SylenThunder Posted January 23, 2022 Share Posted January 23, 2022 I'm curious what isn't readable. Are you not familiar with how a 24-hour clock works? Ingame: Day 99 (Monday), 15:56 Ingame: Day 99 (Monday), 3:56 p.m. Same difference. Both are perfectly readable. Link to comment Share on other sites More sharing options...
Kers Posted January 23, 2022 Share Posted January 23, 2022 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? Link to comment Share on other sites More sharing options...
Flux Posted January 23, 2022 Author Share Posted January 23, 2022 (edited) 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 January 23, 2022 by Flux (see edit history) Link to comment Share on other sites More sharing options...
SylenThunder Posted January 23, 2022 Share Posted January 23, 2022 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 More sharing options...
Kers Posted January 24, 2022 Share Posted January 24, 2022 1 ingame day has 24.000 ticks https://commands.gg/7dtd/settime now we can calculate what we want Link to comment Share on other sites More sharing options...
Flux Posted January 24, 2022 Author Share Posted January 24, 2022 17 hours ago, SylenThunder said: ... If I had to guess I would think that value is based on ticks, .... 8 hours ago, Kers said: 1 ingame day has 24.000 ticks https://commands.gg/7dtd/settime now we can calculate what we want Perfect. Thank you --> Solved <--- Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now