• import { adjustTimezone } from '@src/hylo-components/utils/usefull/usefull';

    Adds the timezone to the given ISO formatted datetime string by using a reference datetime. The date and time values stay the same, only the timezone is added/changed.

    If the given datetime string has a timezone, the changed timezone will show a colon or not depending whether the original showed one. (default is none)

    The reference datetime has to be a full ISO formatted datetime including the timezone for that time at the location you want to set the timezone to.

    Parameters

    • datetime: string

      e.g. 2019-11-05T03:02:09+0200

    • reference: string

      e.g. 2020-12-01T00:00:00+0100

    Returns string

    2019-11-05T03:02:09+0100

Generated using TypeDoc