java - Changing time zone on Tomcat 7 application - Openshift -


i have deployed web application on openshift (free version) , have been struggling fix time-zone no luck. time zone "asia/colombo". how can this?

my application hosted in apache tomcat 7 server.

   // gives me current date server time zone    java.util.date date = new date();     // manage fix issue below code    // without having change server side.    public static date getnormalizeddate() {       calendar today = calendar.getinstance(timezone.gettimezone("asia/colombo"));      calendar cal = calendar.getinstance();       cal.set(calendar.date, today.get(calendar.date));      cal.set(calendar.month, today.get(calendar.month));      cal.set(calendar.month, today.get(calendar.month));      cal.set(calendar.hour_of_day, today.get(calendar.hour_of_day));      cal.set(calendar.minute, today.get(calendar.minute));      cal.set(calendar.second, today.get(calendar.second));       return (cal.gettime());   } 


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -