2023/03/13

Stardates on this site


Captain's log, stardate 78199.692 

I’ve decided to use the new Picard system for stardates on this site. The exact algorithm isn’t given us, so I am matching stardates on the Today’s Stardate app, with the 1945 custom epoch, to make it more useful. Even then, his stardates are slightly different from my calculations, so I had to fudge a bit. 

I have observed that he uses local time instead of Universal Time, which is not good because users have different stardates. Space has no time zones, so why would stardates? I will do the same in order to match. But that makes it useless for coordinating on the Internet. 

The app uses a formula from the Italian Wikipedia. This makes it unnecessarily complex. An advantage of decimal time is that one decimal format can be easily converted into another. Stardates are basically decimal years. All computers use Unix time, which uses decimal seconds, which makes converting a simple multiplication. Here is the app’s code:

{[
      (YEAR - BASEYEAR ) +
      (DAY / DAYSOFTHEYEAR )
] * 1000} +
{[
      (HOUR * 3600 ) + 
      (MINUTES * 60) +
      SECONDS
]* K}

Actually, he gives three different sets of code, so who knows which he’s actually using. Here is how I would do it:

 1000*(UNIXTIME - UTC(BASEYEAR))/SECONDSPERYEAR




No comments:

Post a Comment