Answers for "How to display dates and times in clients timezone using java"

1

get date by timezone java

Date date = new Date();
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

// Use Madrid's time zone to format the date in
df.setTimeZone(TimeZone.getTimeZone("Europe/Madrid"));

System.out.println("Date and time in Madrid: " + df.format(date));
Posted by: Guest on July-23-2020

Code answers related to "How to display dates and times in clients timezone using java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language