ThemeParks.wiki Parks API - v2.0.0
    Preparing search index...

    Function parseTimeInTimezone

    • Interpret a naive (offset-less) date/time string as local-to-the-given-timezone and return an ISO 8601 string with the correct offset.

      If the input already includes an explicit offset or Z, it is returned as-is.

      Supports the following input formats for naive strings:

      • "YYYY-MM-DDTHH:mm[:ss]" (ISO bare)
      • "YYYY-MM-DD HH:mm[:ss]" (ISO bare with space)
      • "MM/DD/YYYY HH:mm[:ss]" (US format, used by Cedar Fair)

      Parameters

      • timeString: string

        Time string to interpret

      • timezone: string

        IANA timezone name (e.g. 'America/New_York')

      Returns string

      ISO 8601 string with timezone offset