grrg
This commit is contained in:
parent
172fae7f40
commit
7e82bd6a98
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
import java.time.*;
|
||||
public class test_kolkata {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
System.out.println(ZoneId.of("Asia/Kolkata"));
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
import java.time.*;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
|
||||
public class test_tz {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
ZoneId zone = ZoneId.of("Asia/Calcutta");
|
||||
LocalDateTime now = LocalDateTime.now(zone).truncatedTo(ChronoUnit.MINUTES);
|
||||
System.out.println("Now in Asia/Calcutta: " + now);
|
||||
LocalTime scheduledTime = LocalTime.parse("11:48:00");
|
||||
LocalTime nowTime = now.toLocalTime();
|
||||
System.out.println("Is equal? " + nowTime.equals(scheduledTime));
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue