Now() does not update hour/minute

Environment: OH 5.0

I have the following rule written in blockly:

if (items.getItem('Tomada_Secador_Roupa_Output_Switch').state == 'ON') {
  items.getItem('Comando_Secador_de_Roupa_Status').sendCommand(((time.ZonedDateTime.now()).format(time.DateTimeFormatter.ofPattern('HH:MM'))));
} else {
  items.getItem('Comando_Secador_de_Roupa_Status').sendCommand('OFF');
}

'OFF';

But now does not update to the actual hour. It always uses the same hour/minute. Is this a bug ?

Hi,

The example is unfortunate in the help. Try ‘HH:mm’

1 Like

I see. MM gives month and mm gives minutes.