Fix some timezone bugs.

This commit is contained in:
MarkBryanMilligan
2021-03-06 15:45:09 -06:00
parent 181513c06d
commit a43222049d
7 changed files with 60 additions and 15 deletions

View File

@@ -56,7 +56,7 @@ public class AuthServlet extends CMServlet {
} else
authCode = Globals.dao.authenticateAccount(auth.getUsername(), auth.getPassword());
}
DaoEntity rep = new DaoEntity("auth_code", authCode);
DaoEntity rep = new DaoEntity("auth_code", authCode).and("timezone", Globals.dao.getTimeZoneForAccount(authCode));
if (isPath(_req, 0, "bin"))
zipBsonResponse(_rep, rep);
else

View File

@@ -40,6 +40,6 @@ public class SignupServlet extends CMServlet {
acct.setTimezone(DateUtils.fromTimeZoneId(_req.getHeader("timezone")).getID());
Globals.dao.putAccount(acct);
String authCode = Globals.dao.authenticateAccount(auth.getUsername(), auth.getPassword());
jsonResponse(_rep, SignupResponse.success(authCode));
jsonResponse(_rep, SignupResponse.success(authCode, acct.getTimezone()));
}
}