STRFTIME does not use host's time zone?

I am using STRFTIME to make a time stamp, but it is off by a few hours.
I used DATETIME, and it is correct. I need to use STRFTIME to format my time properly.

Why is STRFTIME not using my default timezone? Thanks!

Dialplan:

exten => 666,1,Answer exten => 666,2,MYSQL(Connect connid localhost root passw0rd database) exten => 666,3,MYSQL(Query resultid ${connid} SELECT count(column1) from table) exten => 666,4,MYSQL(Fetch fetchid ${resultid} COUNTER) exten => 666,5,NoOp(COUNTER: ${COUNTER}) exten => 666,6,MYSQL(Clear ${resultid}) exten => 666,7,Set(STATUS='RIGHTOH'|g) exten => 666,8,Set(TIME=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}|g) exten => 666,9,NoOp(Timestamp is : ${TIME}) exten => 666,10, MYSQL(Query r ${connid} UPDATE table SET column1=\'${STATUS}\'\, column2=\'${TIME}\') exten => 666,11,MYSQL(Clear ${r}) exten => 666,12,MYSQL(Disconnect ${connid}) exten => 666,13,NoOp(Datetime: ${DATETIME})

CLI output:

-- Executing Answer("SIP/101-8926", "") in new stack -- Executing MYSQL("SIP/101-8926", "Connect connid localhost root passw0rd database") in new stack -- Executing MYSQL("SIP/101-8926", "Query resultid 1 SELECT count(column1) from table") in new stack -- Executing MYSQL("SIP/101-8926", "Fetch fetchid 2 COUNTER") in new stack -- Executing NoOp("SIP/101-8926", "COUNTER: 2") in new stack -- Executing MYSQL("SIP/101-8926", "Clear 2") in new stack -- Executing Set("SIP/101-8926", "STATUS=RIGHTOH|g") in new stack == Setting global variable 'STATUS' to 'RIGHTOH' -- Executing Set("SIP/101-8926", "TIME=2006-08-11 01:29:04|g") in new stack == Setting global variable 'TIME' to '2006-08-11 01:29:04' -- Executing NoOp("SIP/101-8926", "Timestamp is : 2006-08-11 01:29:04") in new stack -- Executing MYSQL("SIP/101-8926", "Query r 1 UPDATE table SET column1='RIGHTOH', column2='2006-08-11 01:29:04'") in new stack -- Executing MYSQL("SIP/101-8926", "Clear ") in new stack -- Executing MYSQL("SIP/101-8926", "Disconnect 1") in new stack -- Executing NoOp("SIP/101-8926", "Datetime: 10082006-21:29:04") in new stack

[/code]

why not specify your timezone as a function parameter ?

It will be much easier with this particular setup to not have to specify it at runtime. I tried TIMESTAMP and it works. I’ll just use some trim and concatenate functions to format the TIMESTAMP instead.

Thanks for your help!