Administration
Timezone conversion with OpenAI and Okta Workflows
Ajay Seetharam

Okta Workflows is a powerful no-code automation platform for identity-centric processes. Large customers with a geographically dispersed workforce - remote workers or partners need to perform identity operations such as user account creation and deactivation at specific times such as 8am local time or 5pm local time based on where the user resides. In order to perform these operations we need a simple way to convert the user’s local time to a common UTC timezone that facilitates automation. 


This is a complex challenge to solve - even if we wrote code. The list of cities where users reside is constantly increasing in a fast growing company. City names can also change over time, sometimes with transitional periods where both the old and new names are used interchangeably for years. Daylight savings time changes and moreover, the dates on which the time changes occur vary and add complexity. And as another consideration, there are leap years! And finally, when we think we have it all accounted for - cities may decide to alter the rules for daylight saving time changes !


Fortunately, OpenAI provides us an easy API call to invoke and given an appropriate prompt will perform the timezone conversion for us. A sample prompt is shown below. 

In this specific execution we are trying to convert 5 p.m. local time in Utqiaġvik, Alaska, USA to UTC. 



Here are some considerations for this specific case:    


  • Formerly known as Barrow, the official name of the village changed to Utqiaġvik in 2016 when village residents voted to change the name back to its traditional Iñupiaq name. 
  • Utqiaġvik follows the Alaska Daylight Time (AKDT) during daylight saving time and Alaska Standard Time (AKST) during standard time. 
  • Daylight Saving Time (DST) ends on the first Sunday of November every year. In 2024, clocks turned back one hour at 2 a.m. on Sunday, November 3rd, returning to standard time. This time change occurs annually, with clocks "springing forward" on the second Sunday of March and "falling back" on the first Sunday of November. 
  • 2024 is a leap year. 
  • From the Uniform Time Act of 1966 to the Sunshine Protection Act at the Federal level in the United States, as well as various state bills tracked by “Save Standard Time” - a nonprofit working to end daylight saving time - the debate is far from over! 


Flopack details and a demo recording are available here


The use of AI and large language models as a general text-in, text-out interface helps us solve complex problems that would have required extensive code to write, test, deploy, and maintain—especially for managing lookup tables for city names! Now, all of this is solved with a simple prompt and AI!

—-

About the Author: Ajay Seetharam, CISSP, is a Certified Technical Architect at Okta and has been involved with customer adoption of Okta Workflows since 2019. His deep technical expertise spans Cloud IaaS, PaaS, SaaS, Security, Integration and Observability technologies. More recently, he has been engaged with customers as they explore AI for identity process automation with Okta Workflows.

  • 0 Likes
  • 0 Comments
  • 556 Views
Skip Feed

Nothing here yet?

Log in to post to this feed.

End of Feed
Nothing here yet?Log in to post to this feed.