Jump to content

[SOLVED] Timestamp issues in PHPMyAdmin


Recommended Posts

Hey there. i'm having a bit of an issue with using timestamps when uploading something to a database.  When i insert an item into my table, i have a field names "DateUploaded" where the type is Timestamp and upon uploading the current time stamp is automatically put in.  I'm having some issue in that the timestamp being put in is not in my timezone so when working with it later, i run into problems.    Using this auto feature is not a must so here is teh question....

 

1) is there a way to alter the "local" timezone in phpmyadmin?

2) if not, i can input the timestamp manually upon insertion but i still run into time zone problems, so how can i get a timestamp with my local time on it?

 

currently i'm getting a time stamp for the west coast of canada while i live in central canada, so I'm two hours ahead.

 

basic rundown...need time from computer, not server

 

Link to comment
https://forums.phpfreaks.com/topic/83056-solved-timestamp-issues-in-phpmyadmin/
Share on other sites

This isn't a issue with PHPMyadmin, it has to do with where the mysql database server resides.  What I do is have an offset in my user's profile, and just subtract/add to the time based on that offset when I display it.

 

You could also use a timezone setting if you use PHP 5.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.