This is a great question, not just in space but also very far up north where it doesn't always have a sunrise and sunset. I don't remember exactly what the answer was, but I do remember reading something good about it. Maybe I'll go look for it.
This is very much an open question in halacha. I'd assume they'd use Mars time for sunrise/sunset, but how the calendar would work I have no idea. Halacha is very earth-centric and I don't know what it would look like in space.
Think about the Jews that were on American Samoa when they skipped Friday and changed to Saturday (moving the international date line) so that they matched with the rest of Samoa...
If you are not on Earth, but it is Saturday on Earth, is it sabbath?