I want to make a function that will convert from a DATE/TIME datatype to a LONG datatype containing the number of seconds from 1-January-1970 to the supplied date.

The trick is that the seconds must always reflect seconds in GMT and the Date supplied may be from a different part of the year (Daylight Savings Time vs Standard Time). So, before converting to seconds, I must convert the DATE/TIME to GMT time.

How can I get the RULES for converting from a TIME in a particular timezone to GMT time? Ideally, it would be nice if I could also send as a parameter the Timezone.