File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
src/main/java/com/coderolls/java/date_and_time/zoneddatetime
target/classes/META-INF/maven/com.coderolls.java/SampleProject Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ Link to the PlayList: https://www.youtube.com/watch?v=uhPLWdvrF9g&list=PLB1G
46
46
39 . [ How To Calculate Duration Between Two Times In Java?] ( https://youtu.be/jx2rgFkgXbg )
47
47
40 . [ Calculate Difference Between Two Dates Using Java 8 ChronoUnit] ( https://youtu.be/m8qP0ZyhMYo )
48
48
41 . [ Instant Class In Java 8 Date And Time API] ( https://youtu.be/7k-YYH4yUxQ )
49
+ 42 . [ ZonedDateTime Class In Java 8 Date And Time API] ( https://youtu.be/OgZYxNiwm2Y )
49
50
50
51
51
52
## [ Chick here to Subscribe our YouTube Channel] ( https://www.youtube.com/channel/UCl31HHUdQbSHOQfc9L-wo3w?sub_confirmation=1 )
Original file line number Diff line number Diff line change
1
+ package com .coderolls .java .date_and_time .zoneddatetime ;
2
+
3
+ import java .time .ZoneId ;
4
+ import java .time .ZonedDateTime ;
5
+
6
+ public class ZonedDateTimeExample {
7
+
8
+ public static void main (String [] args ) {
9
+
10
+
11
+ ZoneId id = ZoneId .systemDefault ();
12
+ System .out .println (id );
13
+
14
+ ZonedDateTime zdt = ZonedDateTime .now (id );
15
+ System .out .println ("Current system default zoned date time: " );
16
+ System .out .println (zdt );
17
+
18
+ ZoneId id2 = ZoneId .of ("America/Los_Angeles" );
19
+ ZonedDateTime zdt2 = ZonedDateTime .now (id2 );
20
+
21
+ System .out .println ("\n America/Los_Angeles zoned date time: " );
22
+ System .out .println (zdt2 );
23
+
24
+
25
+
26
+
27
+ }
28
+
29
+ }
Original file line number Diff line number Diff line change 1
1
# Generated by Maven Integration for Eclipse
2
- # Thu Feb 17 09:39:27 IST 2022
2
+ # Tue Mar 15 15:42:58 IST 2022
3
3
m2e.projectLocation =/home/gaurav/coderolls/coderolls-videos/java-8-features-full-course-examples
4
4
m2e.projectName =java-8-features-full-course-examples
5
5
groupId =com.coderolls.java
You can’t perform that action at this time.
0 commit comments