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

Handling Non-Earth Times (e.g. Mars Time) #2391

Closed
larkin opened this Issue May 27, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@larkin

larkin commented May 27, 2015

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.

@mj1856

This comment has been minimized.

Member

mj1856 commented May 28, 2015

Moment does allow for plugins, which are usually just additional JavaScript functions that take moment as a dependency. However, I'm pretty sure changing the length of a day would be quite difficult.

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!

@mj1856 mj1856 closed this May 28, 2015

@mj1856

This comment has been minimized.

Member

mj1856 commented May 28, 2015

Also - time zones would not help with this. Time zones will adjust a local time by a offset from UTC, but they will not allow for the timekeeping system to be changed from UTC to TAI, UT1, or Martian time. :)

@mj1856

This comment has been minimized.

Member

mj1856 commented May 28, 2015

See also: http://jtauber.github.io/mars-clock/ and the source

@OmarIthawi

This comment has been minimized.

OmarIthawi commented Feb 13, 2018

So, this isn't a joke and Mars timing is actually being requested 🤦‍♂️?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment