U kunt een afgeleide tabel gebruiken (subquery in FROM-clausule):
select mydate, UNIX_TIMESTAMP(mydate)
from
(
SELECT
DATE(CONVERT_TZ(FROM_UNIXTIME(my_time + timezone_offset * 60), @@session.time_zone, '+00:00')) as mydate,
FROM my_table
);
U kunt een afgeleide tabel gebruiken (subquery in FROM-clausule):
select mydate, UNIX_TIMESTAMP(mydate)
from
(
SELECT
DATE(CONVERT_TZ(FROM_UNIXTIME(my_time + timezone_offset * 60), @@session.time_zone, '+00:00')) as mydate,
FROM my_table
);