How to manipulate the values of the curtime

Asked

Viewed 42 times

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

  • Is this difference due to Timezone? It also has DATEDIFF() and TIMEDIFF() functions that can help you see the difference.

  • 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

  • Got it! Have you tried with TIMEDIFF() in query? SELECT TIMEDIFF(<hora_pc>, CURRENT_TIME);

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.