diff --git a/ParseCore/Internal/Encoding/ParseEncoder.cs b/ParseCore/Internal/Encoding/ParseEncoder.cs index 285ead0d..9f7a04e6 100644 --- a/ParseCore/Internal/Encoding/ParseEncoder.cs +++ b/ParseCore/Internal/Encoding/ParseEncoder.cs @@ -40,7 +40,7 @@ public object Encode(object value) { // encoded object. Otherwise, just return the original object. if (value is DateTime) { return new Dictionary { - {"iso", ((DateTime)value).ToString(ParseClient.DateFormatStrings.First())}, + {"iso", ((DateTime)value).ToString(ParseClient.DateFormatStrings.First(), CultureInfo.InvariantCulture)}, {"__type", "Date"} }; } diff --git a/ParseCore/Internal/User/Controller/ParseCurrentUserController.cs b/ParseCore/Internal/User/Controller/ParseCurrentUserController.cs index 54799c9f..45e49802 100644 --- a/ParseCore/Internal/User/Controller/ParseCurrentUserController.cs +++ b/ParseCore/Internal/User/Controller/ParseCurrentUserController.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Globalization; using System.Threading; using System.Threading.Tasks; using Parse.Common.Internal; @@ -46,10 +47,12 @@ public Task SetAsync(ParseUser user, CancellationToken cancellationToken) { var data = user.ServerDataToJSONObjectForSerialization(); data["objectId"] = user.ObjectId; if (user.CreatedAt != null) { - data["createdAt"] = user.CreatedAt.Value.ToString(ParseClient.DateFormatStrings.First()); + data["createdAt"] = user.CreatedAt.Value.ToString(ParseClient.DateFormatStrings.First(), + CultureInfo.InvariantCulture); } if (user.UpdatedAt != null) { - data["updatedAt"] = user.UpdatedAt.Value.ToString(ParseClient.DateFormatStrings.First()); + data["updatedAt"] = user.UpdatedAt.Value.ToString(ParseClient.DateFormatStrings.First(), + CultureInfo.InvariantCulture); } saveTask = storageController