I’m trying to use the DateTime function and up to now it works correctly.
What’s happening is that once I need to display 2 DateTime function one after the other, only the first one displays the correct time, the second one just “Err”.
I have no clue why, because the variable that should be displayed exists …
Any help would be appreciated.
You need to provide a lot more information.
What are your Item definitions?
What is your sitemap Items?
Do you see any errors in your log?
DateTime Dentro_Casa_Udate "Ultimo In [%1$td/%1$tm %1$tH:%1$tM:%1$tS]" <calendar> DateTime Fuori_Casa_Update "Ultimo Out [%1$tg/%1$tm %1$tH:%1$tM:%1$tS]" <calendar>
There are no errors in log about them.
And how are the Items given a value?
I would have thought after my previous responses you would have gotten the hint that we need the actual code, not just “From a Rule.”
"I thought that from you’re previous posts " … is that Ironi?
The code is so simple and working fine, and here is it:
Item FuoriCasa_OFF received update
Dentro_Casa_Udate.postUpdate( new DateTimeType())
Item FuoriCasa_ON received update
Fuori_Casa_Update.postUpdate( new DateTimeType())
Well something isn’t working right and without the code we have no way to see the full picture.
Is this a typo?
DateTime Fuori_Casa_Update “Ultimo Out [%1$tg/%1$tm %1$tH:%1$tM:%1$tS]”
In the previous line you use
DateTime Dentro_Casa_Udate “Ultimo In [%1$td/%1$tm %1$tH:%1$tM:%1$tS]”
no it’s no typo.
These are 2 different line of code.
The first one starts with "Fuori"
the other one starts with “Dentro”.
This is a sample of what happens: (look > Err)
I’m aware they are two different lines of code. Pay attention to the parts that I made bold. I n Fuori_Casa_Update you use “%1tg” but in Dentro_Casa_Udate you use “%1td”.
You got ME…
Looked everywhere except that typo error .!! Silly I was.
Thank you Rich. I owe you one
Funny also that the debug log did not came out with even a Warning!!