If you know how to work a 3 by 3 magic square using the digits 1 to 9, you can make any 3 by 3 magic square starting with any number.
Starting Square
8 1 6
3 5 7
4 9 2
This magic square adds up to 15. That is 3 * the center number.
That is not the magic square you want, but it can be made into yours.
Just add 4 to every number in the base magic square.
12 5 10
7 9 11
8 13 5
And the sum is 3 * 9 = 27 in all the rows columns and diagonals, just what you requested. What happens when you have 0 in the center?
That means you take away 5 from every number in the base square.
3 - 4 1
-2 0 2
-1 4 -3
It still works. Every row column and diagonal add to 0.