up one level
---
2015-06-27
In phpLiteAdmin for CURRENT_TIMESTAMP Function How do I Force the Timestamp to Non-UTC?

I haven’t solved this one yet.

The column of a table that has default value of the CURRENT_TIMESTAMP function, always ends up in UTC.

What I’ve done:

1.
Put this one-line date_default_timezone_set function setting at the top of the script. Like had worked for my ‘log’ script line 36 on github:
( https://github.com/mjassen/log/blob/a3...67/log.php )
Code:
date_default_timezone_set(‘America/New_York’);
This didn’t work.

2.
Search the source code for:
CURRENT_TIMESTAMP
, to figure out how to override it. I found little reference to this string, which tells me it may actually be sent to, and ‘timestamped’ by, sqlite, not phpLiteAdmin.

3.
Searched bing for:
sqlite CURRENT_TIMESTAMP timezone
Which came up with a link to:
“Sqlite: CURRENT_TIMESTAMP is in GMT, not the timezone of the machine”
http://stackoverflow.com/questions/381371/sqlite-current-timestamp-is-in-gmt-not-the-timezone-of-the-machine
I haven’t yet been able to use this to solve my issue…

Conclusion:
Possible next step– I think it’s time to get help on this– reach out to a colleague or to someone on a public forum to ask for help with this question.

A food image:




[2019 edit: Moved to: https://i̶n̶v̶e̶s̶t̶o̶r̶w̶o̶r̶k̶e̶r̶.̶c̶o̶m̶/2015/... .html.]