Page 1 of 2

Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 12:21 pm
by maaarcooose
How does the time display relate to standard dates?

I'm just trying to work out what format they take and how they relate.

For example, what would 25th May 3146 be in oolite time clock?

!m!

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 12:24 pm
by Cody
<chortles>

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 12:43 pm
by maaarcooose
I've asked a stupid question haven't I?

!m!

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 12:57 pm
by cim
maaarcooose wrote:
How does the time display relate to standard dates?
The time display is in days since the start of the calendar. There have been 2084004 of those days at the start of the game, or approximately 5700 Earth years.

There is no specification of how these relate to Earth dates. If you want to take "about 50-60 years before Frontier" as the time period that Oolite is set, then this would put the start of the calendar at around 2560 BC. Why then? Who knows. It's very roughly the time the Great Pyramid of Giza was being constructed.

If you aren't tying yourself to Frontier chronology then put the start of the epoch wherever you like. Personally I would say, based on the data shown on the F7 screens, that Oolite is set some time between 4000 AD and 9000 AD with 7500 AD probably being about right. But I don't expect anyone else to agree with the very long and somewhat tenuous chain of logic which suggests that!

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 1:04 pm
by Cody
<chuckles>
cim wrote:
It's very roughly the time the Great Pyramid of Giza was being constructed.
Stonehenge too, I think.

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 1:11 pm
by maaarcooose
Okay. :?

I was looking at the timeline stuff and also basing on some of the fiction as to what date it's set in which I suppose is linked to Frontier chronology.
Frontier is not something that particularly appears on my radar so screw it.

Right, thanks, that clears it up for me anyway.

<rapidly starts doing some tenuous calculations>

!m!

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 1:13 pm
by Cody
maaarcooose wrote:
Frontier is not something that particularly appears on my radar so screw it.
<nods happily>

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 1:27 pm
by Smivs
maaarcooose wrote:
...linked to Frontier chronology.
Frontier is not something that particularly appears on my radar so screw it.
Indeed. Just as for us today in RLTM, the future is an unknown. Stick to the past and present we know. :)

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 1:30 pm
by another_commander
You may find this useful to include in your script if you are trying to do RL-like date calculations within Oolite:

Code: Select all

this.shipWillLaunchFromStation = function()
{
	player.commsMessage(this.$setDateSince(3125, 2, 21)); // any date you want to start countring from
}


this.$setDateSince = function(year, month, day)
{
	var testDate = new Date();
	testDate.setFullYear(year, month, day);
	
	var secondsPassedTotal = clock.seconds - 2084004 * 86400.0;
	var hoursPassed = Math.floor(secondsPassedTotal / 3600);
	var minutesPassed = Math.floor((secondsPassedTotal % 3600) / 60);
	var secondsPassed = Math.floor(secondsPassedTotal % 60);
	
	testDate.setHours(hoursPassed);
	testDate.setMinutes(minutesPassed);
	testDate.setSeconds(secondsPassed);
	
	return testDate.toLocaleString();
}

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 2:19 pm
by Geraldine
I always use the 20th September 1984 as the start date as that was the date Elite was first released. :D

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 2:47 pm
by JensAyton
another_commander wrote:

Code: Select all

player.commsMessage(this.$setDateSince(3125, 2, 21)); // any date you want to start countring from
N.B.: Because of an insane design decision in JavaScript – one of the few things that actually comes from Java – 3125, 2, 21 means the 21st of March. Months are numbered 0–11, but days are numbered 1–31.

Re: Converting dates to OOlite timecode.

Posted: Mon Jul 30, 2012 3:17 pm
by maaarcooose
Ahruman wrote:
another_commander wrote:

Code: Select all

player.commsMessage(this.$setDateSince(3125, 2, 21)); // any date you want to start countring from
N.B.: Because of an insane design decision in JavaScript – one of the few things that actually comes from Java – 3125, 2, 21 means the 21st of March. Months are numbered 0–11, but days are numbered 1–31.
Yes, I remember this from when I was teaching myself java & javascript (a mere 18 years ago) and trying to write a clock in applet.
Geraldine wrote:
I always use the 20th September 1984 as the start date as that was the date Elite was first released. :D
I also really like the idea of that.

Suddenly I find I'm trying to come up with some sort of time zone space for my fiction.
I definitely want to try and keep it in the OOlite era.

!m!

Re: Converting dates to OOlite timecode.

Posted: Tue Jul 31, 2012 1:48 pm
by Zireael
Hmm, is there an OXP which would display the time in Earth-like days and months instead of this **** timecode?

Re: Converting dates to OOlite timecode.

Posted: Tue Jul 31, 2012 2:09 pm
by Commander McLane
Zireael wrote:
Hmm, is there an OXP which would display the time in Earth-like days and months instead of this **** timecode?
That's a question for the HUD-makers, I suppose. Although cim's remark still applies. If you want to go for a date that relates to the RealLife™ Earth calendar, which year exactly would you like to display? For me the ambiguity of the Oolite time code is a strength, not a weakness.

Re: Converting dates to OOlite timecode.

Posted: Tue Jul 31, 2012 9:15 pm
by maaarcooose
I agree that the ambiguous nature makes it a good thing.

I seem to remember always wondering what the hell stardates in Star Trek meant, but that does have a conversion method.

If general consensus of the creators of oolite is that the timecode is at no particular time, all the better as it just means I can make up whatever time code I like for the fiction, but still try and keep it in the realms of the oolite timecodes displayed in game.

Gives me a bit more flexibility.

!m!