mirror of
https://github.com/zyphlar/LanternPowerMonitor.git
synced 2024-03-08 14:07:47 +00:00
Fix some timezone bugs.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user