Handling Non-Earth Times (e.g. Mars Time) #2391
I'm currently using moment for time handling in a project and one of our common tasks is converting times from UTC to Mars Solar Time and back again effortlessly. At first I had thought that defining a moment timezone would handle this tidily, but it's not just a fixed offset-- days are longer on mars: 24h 37m 22.663s. The other thing is that typically, Mars missions are recorded in sols (martian solar days) from a fixed date (typically when the mission landed on Mars). So Sol 1 would be the solar day the mission landed on Mars. We can call this time (for any specific mission), Mars Mission Time. Per mission, a UTC time can be provided that corresponds to the start of Sol 1.
I was trying to figure out how I could extend moment to allow UTC -> Mars Solar Time -> Mars Mission Time conversions, and the reverse as well. Similarly, I'd like to be able to use moment.format to format dates in Mars Mission Time but I'm afraid it would not handle the extra 37 minutes in the day correctly (would it?)
It looks like I might be able to achieve this with a custom timezone but I'm not sure how that will handle the longer duration of martian days. Any pointers you can give me for where to start implementing this would be much appreciated.
Some background information: http://en.wikipedia.org/wiki/Timekeeping_on_Mars
If this isn't the right venue for a question like this, please let me know where I should direct it.
The text was updated successfully, but these errors were encountered:
You might also refer to the NASA page about Martian time using the Mars24 clock, which divides the Martian solar day into 24 "Martian hours", consisting of 60 "Martian minutes", each with 60 "Martian seconds" - essentially redefining the second to no longer approximate the SI second. This would certainly be challenging for moment.
Closing due to it being out of scope. But good luck!