0
Good morning, I need to make a comparison between a time that is saved in a table and the current time of the database, I am using the curtime(), but in the hosting I am using the hour is 2 hours ahead, and I can not change, how I can do this
0
Good morning, I need to make a comparison between a time that is saved in a table and the current time of the database, I am using the curtime(), but in the hosting I am using the hour is 2 hours ahead, and I can not change, how I can do this
Browser other questions tagged mysql
You are not signed in. Login or sign up in order to post.
Is this difference due to Timezone? It also has DATEDIFF() and TIMEDIFF() functions that can help you see the difference.
– Cleber Griff
Yes, it is due to Timezone, however I have a PROC that is running every minute and checking records that the time of the user matches the time of the server, but because of this difference I will not be able to do the calculation accurately, I tried to enter a -2, but there is cool
– Andre Cabral
Got it! Have you tried with TIMEDIFF() in query? SELECT TIMEDIFF(<hora_pc>, CURRENT_TIME);
– Cleber Griff