How to get object's world rotation around z axis
Without seeing the rest of your code, or even an example of your output, I'm assuming the result does not make sense because they are displayed in radians. Blender uses radians at it's core so all raw rotational data is in radians.
To get the Z rotation of an object, use import mathutils and to convert to degrees from radians, use import math
import bpy
import mathutils
import math

matrix = bpy.data.objects['Cube'].matrix_world # assign Cube matrix
eul = mathutils.Euler(matrix.to_euler('XYZ'), 'XYZ') # create an Euler from the matrix using mathutils
print (math.degrees(eul.z)) # print the Z value from the Euler converted to degrees via math