mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-9768: Time displayed for events in UI is incorrect
This commit is contained in:
parent
17787a194a
commit
b468fde987
@ -263,6 +263,7 @@ public class ApiConstants {
|
|||||||
public static final String ISO_ID = "isoid";
|
public static final String ISO_ID = "isoid";
|
||||||
public static final String TIMEOUT = "timeout";
|
public static final String TIMEOUT = "timeout";
|
||||||
public static final String TIMEZONE = "timezone";
|
public static final String TIMEZONE = "timezone";
|
||||||
|
public static final String TIMEZONEOFFSET = "timezoneoffset";
|
||||||
public static final String TYPE = "type";
|
public static final String TYPE = "type";
|
||||||
public static final String TRUST_STORE = "truststore";
|
public static final String TRUST_STORE = "truststore";
|
||||||
public static final String TRUST_STORE_PASSWORD = "truststorepass";
|
public static final String TRUST_STORE_PASSWORD = "truststorepass";
|
||||||
|
|||||||
@ -58,6 +58,10 @@ public class LoginCmdResponse extends AuthenticationCmdResponse {
|
|||||||
@Param(description = "user time zone")
|
@Param(description = "user time zone")
|
||||||
private String timeZone;
|
private String timeZone;
|
||||||
|
|
||||||
|
@SerializedName(value = ApiConstants.TIMEZONEOFFSET)
|
||||||
|
@Param(description = "user time zoneoffset")
|
||||||
|
private String timeZoneOffset;
|
||||||
|
|
||||||
@SerializedName(value = ApiConstants.REGISTERED)
|
@SerializedName(value = ApiConstants.REGISTERED)
|
||||||
@Param(description = "Is user registered")
|
@Param(description = "Is user registered")
|
||||||
private String registered;
|
private String registered;
|
||||||
@ -138,6 +142,12 @@ public class LoginCmdResponse extends AuthenticationCmdResponse {
|
|||||||
this.timeZone = timeZone;
|
this.timeZone = timeZone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTimeZoneOffset() {
|
||||||
|
return timeZoneOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimeZoneOffset(String timeZoneOffset) { this.timeZoneOffset = timeZoneOffset; }
|
||||||
|
|
||||||
public String getRegistered() {
|
public String getRegistered() {
|
||||||
return registered;
|
return registered;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -987,6 +987,9 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
|
|||||||
if (ApiConstants.TIMEZONE.equalsIgnoreCase(attrName)) {
|
if (ApiConstants.TIMEZONE.equalsIgnoreCase(attrName)) {
|
||||||
response.setTimeZone(attrObj.toString());
|
response.setTimeZone(attrObj.toString());
|
||||||
}
|
}
|
||||||
|
if (ApiConstants.TIMEZONEOFFSET.equalsIgnoreCase(attrName)) {
|
||||||
|
response.setTimeZoneOffset(attrObj.toString());
|
||||||
|
}
|
||||||
if (ApiConstants.REGISTERED.equalsIgnoreCase(attrName)) {
|
if (ApiConstants.REGISTERED.equalsIgnoreCase(attrName)) {
|
||||||
response.setRegistered(attrObj.toString());
|
response.setRegistered(attrObj.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,6 +120,7 @@
|
|||||||
g_username = unBoxCookieValue('username');
|
g_username = unBoxCookieValue('username');
|
||||||
g_userfullname = unBoxCookieValue('userfullname');
|
g_userfullname = unBoxCookieValue('userfullname');
|
||||||
g_timezone = unBoxCookieValue('timezone');
|
g_timezone = unBoxCookieValue('timezone');
|
||||||
|
g_timezoneoffset = unBoxCookieValue('timezoneoffset');
|
||||||
} else { //single-sign-on (bypass login screen)
|
} else { //single-sign-on (bypass login screen)
|
||||||
g_sessionKey = encodeURIComponent(g_loginResponse.sessionkey);
|
g_sessionKey = encodeURIComponent(g_loginResponse.sessionkey);
|
||||||
g_role = g_loginResponse.type;
|
g_role = g_loginResponse.type;
|
||||||
@ -129,6 +130,7 @@
|
|||||||
g_domainid = g_loginResponse.domainid;
|
g_domainid = g_loginResponse.domainid;
|
||||||
g_userfullname = g_loginResponse.firstname + ' ' + g_loginResponse.lastname;
|
g_userfullname = g_loginResponse.firstname + ' ' + g_loginResponse.lastname;
|
||||||
g_timezone = g_loginResponse.timezone;
|
g_timezone = g_loginResponse.timezone;
|
||||||
|
g_timezoneoffset = g_loginResponse.timezoneoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
var userValid = false;
|
var userValid = false;
|
||||||
@ -258,6 +260,7 @@
|
|||||||
g_account = loginresponse.account;
|
g_account = loginresponse.account;
|
||||||
g_domainid = loginresponse.domainid;
|
g_domainid = loginresponse.domainid;
|
||||||
g_timezone = loginresponse.timezone;
|
g_timezone = loginresponse.timezone;
|
||||||
|
g_timezoneoffset = loginresponse.timezoneoffset;
|
||||||
g_userfullname = loginresponse.firstname + ' ' + loginresponse.lastname;
|
g_userfullname = loginresponse.firstname + ' ' + loginresponse.lastname;
|
||||||
|
|
||||||
$.cookie('username', g_username, {
|
$.cookie('username', g_username, {
|
||||||
@ -275,6 +278,9 @@
|
|||||||
$.cookie('timezone', g_timezone, {
|
$.cookie('timezone', g_timezone, {
|
||||||
expires: 1
|
expires: 1
|
||||||
});
|
});
|
||||||
|
$.cookie('timezoneoffset', g_timezoneoffset, {
|
||||||
|
expires: 1
|
||||||
|
});
|
||||||
$.cookie('userfullname', g_userfullname, {
|
$.cookie('userfullname', g_userfullname, {
|
||||||
expires: 1
|
expires: 1
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user