Question
· Apr 1, 2021

Syntax for datetime conversions from UTC

Hey everyone.

I'm attempting to convert a date from UTC to my locale, and for some reason I can't seem to get the Ensemble ConvertDateTime Utility Function to detect the timezone to then convert. I'm hoping it's just a syntax issue, and that someone can show me the error of my ways.

The date format is YYYYMMDDHHmmss+0000 (so for example, 20210401102030+0000)

I was expecting that setting the informat to "%q%z" would mean that the %z picks up the +0000 as UTC, but it doesn't seem to make a difference. The only way I've been able to make this work is by using %K(0) at the start of the informat to explicitly state that it is UTC, but I feel that it's an easy way out.

Any pointers are greatly appreciated.

Product version: IRIS 2019.1
Discussion (2)2
Log in or sign up to continue