Java TimeZone getDefault() Method

The getDefault() method is of TimeZone class is used to get default TimeZone for the host.

Syntax

Returns

It returns the default TimeZone.

Example 1

Output:

The Default TimerZone :
sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=19800000,dstSavings=0,useDaylight=false,transitions=7,lastRule=null]