I get the following Zulu time format result when I use server.BanUsers:
// resultban.BanData[0]: Created: 2019-12-04T14:53:54.795Z Expires: 2019-12-05T02:53:54.795Z
CloudScript:
var resultban = server.BanUsers({ PlayFabId: currentPlayerId, PermanentBan : banpermanently, Bans : [{ DurationInHours : banhours, PlayFabId : currentPlayerId, Reason : banreason }] });
But in Game Manager, the ban looks like this with the UTC format:
Does PlayFab have a built-in function to convert the Zulu time and date format to UTC format?
I want to convert the time and date here in the CloudScript code so that it looks exactly like the UTC format in Game Manager. I think the UTC format is easier to understand for players. I want to display the UTC format in my game.
if (resultban.Error == null) { log.info("Adding ban successful." + "Created: " + resultban.BanData[0].Created + "Expires: " + resultban.BanData[0].Expires); }