Java TimeZone inDaylightTime() Method

The inDaylightTime(Date date) method of TimeZone class returns true if the given date is in Daylight Saving Time in this time zone. Otherwise returns false.

Syntax:

Parameters:

date ? It is the given Date.

Returns:

It will return true if the given date is in Daylight Saving Time. Otherwise, it will return false.

Example 1

Output:

TimeZone In daylight time: false

Example 2

Output:

TimeZone In daylight time: false

Example 3

Output:

Offset value :10800000
TimeZone In daylight time: false