diff --git a/mastodon/src/main/java/org/joinmastodon/android/api/requests/accounts/RegisterAccount.java b/mastodon/src/main/java/org/joinmastodon/android/api/requests/accounts/RegisterAccount.java index 7656d6d4..62214523 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/api/requests/accounts/RegisterAccount.java +++ b/mastodon/src/main/java/org/joinmastodon/android/api/requests/accounts/RegisterAccount.java @@ -4,21 +4,22 @@ import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.model.Token; public class RegisterAccount extends MastodonAPIRequest{ - public RegisterAccount(String username, String email, String password, String locale, String reason){ + public RegisterAccount(String username, String email, String password, String locale, String reason, String timezone){ super(HttpMethod.POST, "/accounts", Token.class); - setRequestBody(new Body(username, email, password, locale, reason)); + setRequestBody(new Body(username, email, password, locale, reason, timezone)); } private static class Body{ - public String username, email, password, locale, reason; + public String username, email, password, locale, reason, timeZone; public boolean agreement=true; - public Body(String username, String email, String password, String locale, String reason){ + public Body(String username, String email, String password, String locale, String reason, String timeZone){ this.username=username; this.email=email; this.password=password; this.locale=locale; this.reason=reason; + this.timeZone=timeZone; } } } diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/onboarding/SignupFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/onboarding/SignupFragment.java index 7f4fe256..8455100c 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/onboarding/SignupFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/onboarding/SignupFragment.java @@ -45,6 +45,7 @@ import org.jsoup.nodes.TextNode; import org.jsoup.select.NodeVisitor; import org.parceler.Parcels; +import java.time.ZoneId; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -189,7 +190,7 @@ public class SignupFragment extends ToolbarFragment{ edit.setError(null); } errorFields.clear(); - new RegisterAccount(username, email, password.getText().toString(), getResources().getConfiguration().locale.getLanguage(), reason.getText().toString()) + new RegisterAccount(username, email, password.getText().toString(), getResources().getConfiguration().locale.getLanguage(), reason.getText().toString(), ZoneId.systemDefault().getId()) .setCallback(new Callback<>(){ @Override public void onSuccess(Token result){