It looks like the TZ of your database is set to GMT (UTC), which is as it should be.
You need to convert your local date into GMT when adding to the database.
from the MySQL 5.1
CONVERT_TZ() converts a datetime value dt from time zone given by
from_tz to the time zone given by to_tz and returns the resulting value.Time zones may be specified as described in Section 5.10.8, “MySQL Server Time Zone Support”. This function returns NULL if the arguments are invalid. If the value falls out of the supported range of the TIMESTAMP type when converted fom from_tz to UTC, no conversion occurs. The TIMESTAMP range is described in Section 11.1.2, “Overview of Date and Time Types”.
|
Wednesday, October 9, 2013
Mysql Time Convert to GMT Format Example
Subscribe to:
Posts (Atom)
Labels
AJAX
(1)
Answers
(1)
Apache
(1)
Array
(16)
bug
(1)
C
(1)
C++
(1)
Calendar
(1)
Class
(1)
Commands
(1)
Cookies
(2)
Database
(2)
Date
(7)
Days
(1)
explode
(1)
File Upload
(1)
FILES
(1)
firewall
(1)
fix
(1)
Functions
(26)
GET
(1)
GMT
(1)
JavaScript
(2)
localhost
(1)
Mail
(1)
Menu
(1)
MYSQL
(13)
PERL
(1)
PHP
(36)
php.ini
(1)
POST
(1)
preg_match
(1)
Questions
(1)
Script
(1)
SMS
(2)
Solution
(1)
String
(1)
Time
(5)
Time Zone
(1)
Vista
(1)
Wamp Server
(1)
windows 7
(2)
XML
(1)
Popular Posts
-
The INSERT INTO statement is used to insert new records in a table. Insert Data Into a Database Table The INSERT INTO statement is us...
-
<? /* Simple and easy for modification, PHP script for SMS sending through HTTP with you own Sender ID and delivery reports. You just ...
-
More about forms Transmission methods HTTP, the transmission protocol used for the Web, actually defines two methods for sending form i...
-
Send SMS through way2sms using php 1. download one rar file - click here to download 2. extract the rar file 3. ...
-
SQL Dump to Database <?php // open the .sql file $fp = @fopen("mysql.sql", "r"); $file = fread($fp, 80000); fclose($...
-
The simplest way to think of PHP is as interpreted C that you can embed in HTML documents. The language itself is a lot like C, except wi...
-
Input validation The preg_match function Users submitting information to a Web site don't always behave quite as you would like. U...
Popular Posts
-
Send SMS through way2sms using php 1. download one rar file - click here to download 2. extract the rar file 3. ...
-
<? /* Simple and easy for modification, PHP script for SMS sending through HTTP with you own Sender ID and delivery reports. You just ...
-
Creating a registration form using PHP in PHP Form Creating a membership based site seems like a daunting task at first. If you eve...
-
if ($_POST['Date'] == "") { $Date = ''; } else { $Date = $_POST['Date']; } list($Day,$Month,$Year)=...
-
Calculate No Of Days Excluding Weekends Count the number of days between two dates that exclude weekends as non work days Count...
-
Loading a Drop Down List Using jQuery in jQuery To load a drop down list (or a simple list) from a database, there are different wa...
-
More about forms Transmission methods HTTP, the transmission protocol used for the Web, actually defines two methods for sending form i...
-
Making a login form using PHP in PHP Form This is in continuation of the tutorial on making a membership based web site. Please see t...
-
The SELECT statement is used to select data from a database. Select Data From a Database Table The SELECT statement is used to select...
-
Default Time Zone of php.ini for India Example : Search date.timezone if php.ini file and then remove the ; infront of it and write ...