The --time-format long option for dmesg is a possibility using the iso format:
(note the T and no space between the date and the time, due to the iso format)
The sed only works if you have a line with 2022-12-12T09 and a line with 2022-12-12T10 in your logs.
$ sudo dmesg --time-format=iso | sed -n '/2022-12-12T09/,/2022-12-12T10/p'
You could alternatively do something like this to add more specificity to the time range (here, we are grabbing only the specified minutes in the range):
In this one, you'd also need a line with 2022-12-12T09:16 and a line with 2022-12-12T09:24 in your logs.
$ sudo dmesg --time-format=iso | sed -n '/2022-12-12T09:16/,/2022-12-12T09:24/p'
From the manpage
--time-format format
Print timestamps using the given format, which can be ctime, reltime, delta or iso. The first three formats are aliases of the
time-format-specific options. The iso format is a dmesg implementation of the ISO-8601 timestamp format.
The purpose of this format is to make the comparing of
timestamps between two systems, and any other parsing, easy. The definition
of the iso timestamp is: YYYY-MM-DDHH:MM:SS,<-+>.
The iso format has the same issue as ctime: the time may be
inaccurate when a system is suspended and resumed.