Date date = Calendar.getInstance(timeZone, Locale.US).getTime();
and also in /jforum/view/forum/PostCommon.java in method Post fillPostFromRequest()
I replaced p.setTime(new Date()); with
The times in most of the jForum schema's are DateTime. For most SQL servers this is like Java's Date object. It's just a big integer number that is the millisecs or secs since some base GMT date.
Even if the server time is set to US Eastern Time and you are in India, Now() is still the same integer number.
So, IMHO, the problem is not in the STORING of the date, but in the DISPLAY of the date. DateFormat objects that are created without either a locale or having a TimeZone set will use the JVM's default settings.
So this means that all the SimpleDateFormat instances will need to be tracked down and modified. Or, if you control the JVM on the server, you can probably modify the default locale via a start up parameter so you get the correct time.
Best way to deal with it is to have a default timezone and a user preference option. (Hmm, maybe the default should be settable at the category, forum level too?) [originally posted on jforum.net by monroe]