SQLite query rows nearest to hour
time_stamp - 1800 subtracts two numbers. If the value in the time_stamp column is not a number, it is converted.

From what you've shown, converting the values in the time_stamp column (which begin with the characters 2015) to a number results in the value 2015; subtracting 1800 from that results in 215. This is probably not what you want.

To group by hours offset by half an hour, just add half an hour to the timestamp, then drop the minutes/seconds:

GROUP BY strftime('%H', time_stamp, '+30 minutes')