From my answer to Parker Solar Probe passing extremely close to the Sun; what relativistic effects will it experience and how large will they be?:
From here (or here if you are ambitious) the lowest order terms to the relativistic frequency shift of a clock in orbit around a gravitational body are:
$$ \frac{\Delta f}{f} \approx -\frac{\Phi}{c^2} - \frac{v^2}{2c^2} = -\frac{GM}{r c^2} - \frac{v^2}{2c^2},$$
where the first term is the gravitational shift and the second is time dilation.
Plugging the standard gravitational parameter $GM$ and radius $r$ of Mars into the term $-\frac{GM}{r c^2}$ I get 1.4E-10.
That means that the shift in the rate of a clock due to Mar's surface gravity is -0.14 parts per billion. For Earth it's -0.69 ppb.
But the problem is more complicated. So let's include some more correction terms.
Mars and Earth are moving fast in orbit around the Sun, and they sit in the Sun's gravitational potential. Let's look at the relative sizes of these terms:
All values x1E-09
local gravity local rotation Sun's gravity orbital velocity
Mars -0.140 -0.0003 -6.478 -3.239
Earth -0.695 -0.001 -9.870 -4.935
To answer the question: -0.140 minus -0.695 equals +0.555 parts per billion, due only to the local planetary gravities; things are faster on Mars than on Earth by 555 parts per trillion.
But the big effects have to do with the heliocentric orbits.
-0.140 + -0.0003 + -6.478 + -3.239 minus -0.695 + -0.001 + -9.870 + -4.935 gives +5.644.
Overall: time is faster by about 5.6 parts per billion on Mars relative to Earth, but that's mostly due to Earth's orbit being closer to the Sun.
Compare that to roughly ~430 pars per billion (half of a ppm) for the Parker Solar Probe when it swings close to the Sun!
Those are typical values and not meant to be accurate to the number of decimal places shown because both the Earth and Mars are moving in elliptical orbits, and so each one varies differently with time. I've rewritten the equations in that answer incorporating the vis-viva equation for a more convenient form shown below, but it would be better to use proper state vectors .
$$ \frac{\Delta f}{f} \approx -\frac{GM}{c^2}\left(\frac{2}{r}-\frac{1}{2a} \right).$$
edit: How would this frequency difference be measured?
One way would be to put an ultra-stable clock on each planet that emitted one pulse every second (local time) that fired a laser into space. A ship could time the difference between the two, correct for the light-time it took for the laser. As the OP calculates after one year the difference would be about 0.17 seconds.
However, if you started flying around to check each clock yourself and compare it to your portable ultra-stable clock, the problem becomes much more complicated to solve, and beyond what I'm able to explain with any confidence... okay, absolutely unable to explain even a little. ;-)