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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.