How do you want to render out a martian day? A martian day appears to be 24h 39m 35.25s.
Did you want your clock to sit there with a stupid look on it's face, doing nothing for 39 minutes and 35.25 seconds? 'Cuz that's doable. You can even "invent" a new hour for it to display: 13:00 o'clock. After 12:59:59, you'd roll over to 13:00:00, and after 13:39:35 you'd roll over to 1:00 am.
The other way to do it is to just slow the clock down. You could just configure the clock to "lose" 2,375 seconds each day, which would work out to laggging a second every 36.379 seconds. You don't need to be that precise, by the way. If you lag out every 36 seconds you will lose precisely 2400 seconds in a day which works out to your 40 minutes.
Pick one. The solution is wildly different depending on which one you pick, but both of them are fairly straightforward.
Red M&M, Blue M&M: They all wind up the same color