sql - Current timestamp in mySQL is delayed by 30 minutes -


i trying catch current time using current_timestamp query.

but returning time delayed 30 minutes.

so if there way right time? or can increment time automatically.

i have used syntax.

data type of time datetime. , tried timestamp.

 update mytable set time=current_timestamp id=1; 

this occurring because of system timezone offset.

run query timezone offset of system mysql running on

select timediff(now(),convert_tz(now(),@@session.time_zone,'+00:00')); 

compare timezone in.

alternately can run following correct time (replace timezone yours), means have every session.

set time_zone='-06:00'; select current_timestamp; 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

dataset - MPAndroidchart returning no chart Data available -

post - imageshack API cURL -