SDK JS
    Preparing search index...
    • Inverse of solarMinuteOfDay: the UTC instant for a local solar minute-of-day on a given calendar day.

      Parameters

      • day: Date

        Any instant on the target UTC calendar day (only its Y/M/D are used).

      • minute: number

        Local solar minute-of-day; clamped to [0, 1440].

      • lng: number

        Longitude in degrees the solar time is referenced to.

      Returns Date

      The corresponding UTC Date.

      // 09:30 local solar time at the view's longitude, on today's date — so the
      // clock always opens at the same reading while the sun's elevation still
      // tracks the season.
      const openingDate = dateAtSolarMinute(new Date(), 9 * 60 + 30, -157.82);
      setTimeOfDay({ map, location: 'map-center', layers: [mesh], date: openingDate });