Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Calculating DST Offset

    Posted 07-01-2021 23:07
    No replies, thread closed.
    Hey y'all ..

    Wondering if anyone has a 'clean' expression for calculating the current local offset from UTC?

    I've seen lots of example for calculating current date and/or time based on a *known* offset, but I'd like to get the current offset in hours (or integer).

    For example, in Sydney 'Standard' time is UTC+10 and 'Daylight' Time is UTC+11, I want to play a diferent message for Standard Time compared to Daylight time.

    Thanks in advance!

    Cheers,
    Mal.
    #ArchitectureandDesign

    ------------------------------
    Thanks and regards,
    Malcolm Green
    Nexon Asia Pacific
    ------------------------------


  • 2.  RE: Calculating DST Offset

    Posted 07-02-2021 00:56
    No replies, thread closed.
    Hey Malcom

    There may be another way of achieving what you want, but there is an API  that you can probably call through a Data Action that will return a list of all time zones and "current" offset.  You'd then need to parse out from the results the specific time zone ID you want to get the offset value for.

    /api/v2/timezones

    ------------------------------
    Vaun Mccarthy
    NTT New Zealand Limited
    ------------------------------



  • 3.  RE: Calculating DST Offset

    Posted 07-05-2021 18:05
    No replies, thread closed.
    You can use World Time API: Simple JSON/plain-text API to obtain the current time in, and related data about, a timezone. to get the current time in a zone and then use the diff statements against that time.

    ------------------------------
    Robert Wakefield-Carl
    Avtex Solutions, LLC
    Contact Center Innovation Architect
    robertwc@avtex.com
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------