[SOLVED] How to copy DateTime item to another DateTime item?

Hi,

I’m trying to copy alarm clock time to a proxy item (because android sends NULL to the original item on exact alarm time, so if there is 1 second time difference between the client and the server, the alarm rule does not trigger)

this rule doesnt do anything it seems…any clue why?

rule “Alarm Clock Update”

when

Item AlarmClock changed

then

createTimer(now.plusSeconds(10))[
AlarmClock2.postUpdate(AlarmClock.state as DateTimeType)
]
end

ignore, it worked…i guess too many attempts, change/save of rules file…

Seems like this is the bigger problem you should address. Setting up NTP on this server should deal with that problem. That should keep the machine much closer than one second off from the android’s time which it gets from the cellular network or GPS.

All sorts of stuff can fail if the clock gets too far off, in particular a lot of encryption key exchanges depend on a synchronized clock. If you try to integrate a binding that uses OAuth or the like, it might fail because of the clock.

There would be much bigger difference if I ran my network without ntp, I’m not crazy :slight_smile:

The ntp of my gsm network provider I cannot control, so it is what it is. Debian ntp vs etisalat local network ntp.

I cannot have my morning routine hanging by a thread on part of a second…even if it skewes by 0.3sec, so by the time OH thinks its 7:00:00 the alarm is already cancelled via unreasonable UNDEF by Android who thinks its 7:00:00 some 0.2 seconds earlier..