Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. DELIMITER //
  2. CREATE PROCEDURE time_convert (IN time_server DATETIME, OUT time_client DATETIME) BEGIN
  3. DECLARE timezone INT;
  4. SET timezone=3;
  5. IF(timezone>0 OR timezone=0)THEN
  6. SET time_client=convert_tz(time_server,@@session.time_zone,CONCAT('+',timezone,':00'));
  7. ELSE
  8. SET time_client=convert_tz(time_server,@@session.time_zone,CONCAT(timezone,':00'));
  9. END IF;
  10. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement