I'm using JSP for a website, and there I have to display time. I have previously tried using LocalDate.now()
and Date
together with Calendar
, like this:
Date date = new Date();
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
But this also gave me UTC Time instead of PST. I can't set it manually with ZoneSet because all user's will have a different timezone. How can I fix this? I'm using Java 8