We just discovered that all timestamps (e.g. Account creation times) are in localtime, instead of UTC. This is since mktime is used instead of an implementation of mkgmtime.
Is that on purpose? If one changes readDatetime, we also might have to change writeDatatime?
void PlayFab::writeDatetime(time_t datetime, PFStringJsonWriter& writer) { char buff[40]; strftime(buff, 40, "%Y-%m-%dT%H:%M:%S.000Z", gmtime(&datetime)); writer.String(buff); } time_t PlayFab::readDatetime(const rapidjson::Value& obj) { std::string enumStr = obj.GetString(); tm timeStruct = {}; unsigned int milliseconds = 0; // milliseconds are truncated in a standard time_t structure sscanf(enumStr.c_str(), "%u-%u-%uT%u:%u%u.%uZ", &timeStruct.tm_year, &timeStruct.tm_mon, &timeStruct.tm_mday, &timeStruct.tm_hour, &timeStruct.tm_min, &timeStruct.tm_sec, &milliseconds); timeStruct.tm_year -= 1900; timeStruct.tm_mon -= 1; return mktime(&timeStruct); }