001 package railo.runtime.functions.dateTime; 002 003 import java.util.TimeZone; 004 005 import railo.commons.date.TimeZoneUtil; 006 import railo.runtime.PageContext; 007 import railo.runtime.exp.PageException; 008 import railo.runtime.ext.function.Function; 009 010 public class SetTimeZone implements Function{ 011 public static String call(PageContext pc,String strTimezone) throws PageException { 012 TimeZone old = pc.getTimeZone(); 013 pc.setTimeZone(TimeZoneUtil.toTimeZone(strTimezone)); 014 return TimeZoneUtil.toString(old); 015 } 016 017 }