Check the help and documentation for whatever function you use to get the "world magnetic field". In the IGRF-implementation (and this is the standard in the geomagnetic/geophysics/space physics communities (and sure there is apparently a rift...)) for the magnetic field the convention is to have x in the local North direction, y in the local East and z downwards, so that would be my guess - but I cannot be sure.
HTH