Example usage for org.springframework.format.datetime.joda JodaTimeContext setTimeZone

List of usage examples for org.springframework.format.datetime.joda JodaTimeContext setTimeZone

Introduction

In this page you can find the example usage for org.springframework.format.datetime.joda JodaTimeContext setTimeZone.

Prototype

public void setTimeZone(@Nullable DateTimeZone timeZone) 

Source Link

Document

Set the user's time zone.

Usage

From source file:com.springsource.greenhouse.home.DateTimeZoneHandlerInterceptor.java

public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
        throws Exception {
    JodaTimeContext context = new JodaTimeContext();
    context.setTimeZone(getTimeZone(request));
    JodaTimeContextHolder.setJodaTimeContext(context);
    return true;// w ww . j a  v  a  2  s . c  om
}

From source file:name.cphillipson.experimental.gwt.server.interceptor.DateTimeZoneHandlerInterceptor.java

@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
        throws Exception {
    final JodaTimeContext context = new JodaTimeContext();
    context.setTimeZone(getTimeZone(request));
    JodaTimeContextHolder.setJodaTimeContext(context);
    return true;/*from  ww  w .  ja  v  a2  s . c om*/
}