Answers for "java datetime with timezone"

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
0

java date format with timezone

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.getDefault());
    simpleDateFormat .format(new Date());
Posted by: Guest on June-15-2021

Code answers related to "java datetime with timezone"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language