In programming, we use a start date and count the milliseconds since that date, to calculate the 'time since epoch' (which is 1970 Jan 1st 00:00:00 I believe). A class called DateTime does all the math for us. Searching for HOW DateTime does this math usually yields helpful answers like "Just use DateTime". This unfortunately doesn't help me if I want to use the math to calculate date and time of a different timeframe in which time runs faster.
What I'd like to know is what's the math that goes in to figuring date time? Date Time being the Day, Month, Year. Hours and minutes in a day, optionally the seconds. The day of the week may also be figured out from the milliseconds since epoch (somehow).
The problem I'd like to solve is this: There is 3.6 of our minutes in a game hour. (I picked this with the assumption that I can easily figure out the angle of the minutehand on a clock with 3.6min to an hour). Lets call this accelerated timeframe "game time". While only 3.6 minutes passes our time, in game time 60 minutes would pass.
This should means an hour in game time is 216000 of our milliseconds long. A minute should be 3600ms long. A second should be 60ms long. A Day should be 5184000ms long. That's assuming I did the math right. If I'm off feel free to correct me.
Let us assume the 'epoch' of this gametime begins at 1970 Jan 1st 00:00:00.
If I have a number of milliseconds since Epoch, how would I find the year, date, and time? Assume the world of the game doesn't have leap years or leap seconds. The planet is in perfect orbit that takes exactly 365 days to go around the sun, and the planet spins 360 degrees every 24 hours exactly.
My assumption is that modulus and division is needed to figure this out, but I get lost along the way and I don't get reasonable answers.
My assumption was that I could take the number of milliseconds passed, say 1485902668429ms (which was picked based on the time I queried for milliseconds since epoch) and modulo that by (the number of ms for an hour times 24, times 365), and that would get me the number of years since 1970. But the number I get is ridiculously big, which I suppose means that it's time in milliseconds still?