I need to convert a database column in a (MSSQL) database table into UNIX time_t. The problem is that this column does not have a timezone and some dates are from GMT (+0000) and some from BST (+0100). I am working on UK times.
Is there a reliable way to convert unzoned datetime into UNIX time_t? I'm currently using
SELECT *,DATEDIFF(second,'1970-01-01',event_time)
But this seems to be subject to the current timezone, not that applicable to the date.
I don't mind if I do the conversion in SQL or code. I'm working in Perl.