Search in sources :

Example 1 with GXTimeZone

use of com.genexus.util.GXTimeZone in project JavaClasses by genexuslabs.

the class JavaModelContextExtension method setTimeZone.

public Boolean setTimeZone(ModelContext model, String sTz) {
    HttpContext httpContext = (HttpContext) model.getHttpContext();
    sTz = CommonUtil.rtrim(sTz);
    TimeZone tz = TimeZone.getTimeZone(sTz);
    Boolean ret = tz.getID().equals(sTz);
    if (ret) {
        model.setCurrentTimeZone(tz);
        httpContext.webPutSessionValue("GXTimezone", tz.getID());
    }
    return ret;
}
Also used : TimeZone(java.util.TimeZone) GXTimeZone(com.genexus.util.GXTimeZone) HttpContext(com.genexus.internet.HttpContext)

Aggregations

HttpContext (com.genexus.internet.HttpContext)1 GXTimeZone (com.genexus.util.GXTimeZone)1 TimeZone (java.util.TimeZone)1