Thank you, that works nice. Now only problem is that sleeping, doesn't change the day number. Here is the prntscreen of the time variables. If I'm remember corectly I didn't change them, just copy from your day/night demo.
Also when the time reach 0:00 the day number changes nicely, but then when I change map to (home-where calendar event is) it goes back to day 1. So maybe the problem with sleep not changing the day is the calendar event in the same map?