Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wiki] offsetTime - what's the unit, exactly? #19

Open
ratemisia opened this issue Jul 24, 2024 · 1 comment
Open

[Wiki] offsetTime - what's the unit, exactly? #19

ratemisia opened this issue Jul 24, 2024 · 1 comment

Comments

@ratemisia
Copy link

Hello,
I'm writing Kronometer configs for myself, and have been struggling to find information on some of the details. I'm not sure if Sigma or @linuxgurugamer or perhaps someone else is maintaining the Readme these days - I understand Linuxgurugamer has almost countless other mods to maintain - but I and perhaps some others would benefit from some more information on the offsetTime value. I'd be happy to hear from anyone who's more familiar with Unity and Kerbal time than I am on this.

I understand that offsetTime directly changes the displayed time based on KSP's "epoch" time (the number that can be seen in save files, which directly indicates the time since the save was started as a double, if I understand correctly) and before time is broken up into years, months, days. It also appears to be the only way to get offset precision of less than one day, as the other offsets are all integers.

Say I want days to start at midnight, and not in the morning, as they do by default. Is there information out there on what numerical value to put in offsetTime to offset the time by so many hours? Is there perhaps a smarter way to do that that doesn't involve offsetTime? Would giving such information be impractical (depends on latitude, time of year, etc)?

@Sigma88
Copy link
Collaborator

Sigma88 commented Aug 18, 2024

going by memory, I'd say offset is in seconds (so 1.0 offset would be one second)

this is used to change only the displayed time in game rather than changing the position of the sun, I thought the game clock started at 00:00 otherwise if it starts at a different time (eg. 2:00 am) you should add or remove seconds in order to get 00:00 at the start,

so if it starts at 2:00 am (which is 2h away from midnight, you should offset by -2h = -7200 s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants