Simple Blockly rule to calculate consumption (item state gain) from the start of the day (Midnight)

This has been taken from a marketplace block library: Date and Time

The official block looks like this

image