Hi Juan,
That is an interesting problem..
The main problem is, that the sun rotation, doesn’t directly transfer to a time…
But if you are able to make a correlation, there are probably many ways to do this, but here’s one idea:

You’ll need to do the math to get the conversion you want, but this might get you in the right direction.