Possible Duplicate:
Can You Determine Timezone from Request Variables?
I have a requirement where in I have to convert long value (that I get from model by System.currentmillis method) into date form according the to respective timezone.
I tried this (I know its bad practice to have java code but i didnt see any options):
<c:set var="timezone">
<% java.util.Calendar.getInstance(request.getLocale()).getTimeZone().getID(); %>
</c:set>
<jsp:useBean id="startDateValue" class="java.util.Date" />
<jsp:setProperty name="startDateValue" property="time" value="${taskStatsMap['value']['taskStartTime']}" />
<td class="tdcenter">
<fmt:formatDate type="both" dateStyle="short" timeStyle="long" value="${startDateValue}" timeZone="${timezone}" />
</td>
Can somebody please help me to get date as per request timezone? And is it possible using jstl tags to get request timezone?