How to get date time in utc+8 and gmt+8

I am trying to convert the time in utc+8 or gmt+8 but both not working.
I am using this ${STRFTIME(${EPOCH}+0800,%Y%m%d%H%M%S)}, I do not whether it is correct or not

I’m not sure what you are trying to achieve here. That’s not how time zones work.

Although this is not the way that people do it, you would have to add 28800, not 0800 (I’m not sure how 0800 would be handled; it might be treated as an invalid octal number, rather than the same as 800).

I don’t know the standard way of doing this in Asterisk, as I’ve only ever needed to set the timezone at the OS level, when using it.

I did manage to achieve this by specifying the time zone after epoch

1 Like

Timezone names are the way to go. Trust the folks who maintain the Olson database!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.