I have in xagss thanks to Tom Keller who was the one who did the following:
'historical_hour_avg': "SELECT avg({obs_type}) FROM {table} "
"WHERE STRFTIME('%m-%d-%H', datetime, 'unixepoch', 'localtime') "
"= '{month:02d}-{day:02d}-{hour:02d}'",
to calculate the average historical temperature of that day at that time.
If I use day.outTemp.historical_hour_avg the hour it uses is 0:00 which is not what I want.
If I use current.outTemp.historical_hour_avg it does nothing. It doesn't show an error or give any results.
How can I pass the current time to xagss and why doesn't it work with $current?