Rate this page:

getLocalTime

Copy URL
getLocalTime(timezone: 

string

,
date:

Date

):

Date

Converts the date to the specified local timezone. Note that new Date() always returns time in the UTC+0 timezone.

Parameters

  • timezone:

    string

    Local timezone in the AREA/LOCATION format of the tz database.

  • date:

    Date

    Instance of the Date object.

Returns

  • type:

    Date