2023-05-16 13:00:31 +00:00
|
|
|
DROP FUNCTION IF EXISTS `util`.`mockTime`;
|
2023-05-17 07:23:37 +00:00
|
|
|
|
|
|
|
DELIMITER $$
|
|
|
|
$$
|
|
|
|
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTime`() RETURNS datetime
|
|
|
|
DETERMINISTIC
|
|
|
|
BEGIN
|
2023-05-17 11:14:43 +00:00
|
|
|
RETURN CONVERT_TZ('@mockDate', 'utc', 'Europe/Madrid');
|
2023-05-17 07:23:37 +00:00
|
|
|
END$$
|
|
|
|
DELIMITER ;
|
|
|
|
|
|
|
|
DROP FUNCTION IF EXISTS `util`.`mockUtcTime`;
|
|
|
|
|
|
|
|
DELIMITER $$
|
|
|
|
$$
|
|
|
|
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockUtcTime`() RETURNS datetime
|
|
|
|
DETERMINISTIC
|
|
|
|
BEGIN
|
2023-05-17 11:14:43 +00:00
|
|
|
RETURN CONVERT_TZ('@mockDate', 'utc', 'Europe/Madrid');
|
2023-05-17 07:23:37 +00:00
|
|
|
END$$
|
|
|
|
DELIMITER ;
|
|
|
|
|
|
|
|
DROP FUNCTION IF EXISTS `util`.`mockTimeBase`;
|
|
|
|
|
|
|
|
DELIMITER $$
|
|
|
|
$$
|
|
|
|
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTimeBase`(vIsUtc BOOL) RETURNS datetime
|
|
|
|
DETERMINISTIC
|
2023-05-16 13:00:31 +00:00
|
|
|
BEGIN
|
2023-05-17 11:14:43 +00:00
|
|
|
RETURN CONVERT_TZ('@mockDate', 'utc', 'Europe/Madrid');
|
2023-05-17 07:23:37 +00:00
|
|
|
END$$
|
2023-05-16 13:00:31 +00:00
|
|
|
DELIMITER ;
|
2023-05-17 07:23:37 +00:00
|
|
|
|