This would actually be an interesting question, since most bodies in deep space would not have a rotational or orbital period resembling an Earth day or year at all.
For totally artificial colony structures, the inhabitants could set the "day" to whatever they like, but since they probably would have an earthly biosphere, it would be much easier set their clocks and systems to replicate Earth rather than try to tweak entire ecosystems to match some arbitrary system.
On planetary bodies, where they would have a difficult time resetting the planetary rotation and orbit unless they have some truly heroic megaengineering skills, they will probably still use the second as a basic unit of measurement. This will allow them to divide the days and years into convenient slices (kiloseconds and megaseconds are common SF tropes) that can be roughly matched up with the planet's own cycle.
Using seconds also means they can be on a universal calendar like the UNIX calendar (which by odd coincidence starts very close to when Man first set foot on the Moon: UNIX time starts Jan 01 1970. A few centuries from now, the difference between July 21 1969 and Jan 01 1970 will seem trivial). Once again, they may opt to set their time to match the standard Earth day and year in order to maintain biospheres and ecosystems with minimum fuss. If you are living in a bubble hundreds of metres below the ice surface of Europa, for example, you might not want or need to take reference to the cycles of Jovian orbital time anyway, except to calculate windows for spaceflight.
Since, as noted by Samuel, the effects of gravity will be minuscule, this should serve to allow for everyone to be on one universal time/calendar standard for simplified record keeping, timestamps on documents and transactions and so on. The only real issues will be for spacecraft travelling at a high fraction of c and near very deep gravity wells like event horizons of black holes.