salix/db/dump/mockDate.sql

34 lines
778 B
MySQL
Raw Normal View History

2023-05-16 13:00:31 +00:00
DROP FUNCTION IF EXISTS `util`.`mockTime`;
DELIMITER $$
$$
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTime`() RETURNS datetime
DETERMINISTIC
BEGIN
RETURN CONVERT_TZ('2001-01-01 11:00:00', 'utc', 'Europe/Madrid');
END$$
DELIMITER ;
DROP FUNCTION IF EXISTS `util`.`mockUtcTime`;
DELIMITER $$
$$
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockUtcTime`() RETURNS datetime
DETERMINISTIC
BEGIN
RETURN CONVERT_TZ('2001-01-01 11:00:00', 'utc', 'Europe/Madrid');
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
RETURN CONVERT_TZ('2001-01-01 11:00:00', 'utc', 'Europe/Madrid');
END$$
2023-05-16 13:00:31 +00:00
DELIMITER ;