dropTime Create a new date by dropping the time (hours, minutes, seconds and milliseconds) to zero for the given date and timezone.

Input:
1673316000000 = 2023-01-09 18:00:00 PST
Returns:
1673251200000 = 2023-01-09 00:00:00 PST
  • Parameters

    • date: Date

      the date to be changed.

    • OptionaltimeZone: string

      The IANA time zone name to use for the conversion. Defaults to the system time zone.

    Returns Date