• steve.casey (11/26/2010)


    I see that you've defined @GMTOffset as an integer variable.

    What happens if you're in Adelaide? Or Darwin? Or Caracas?

    Better use a TRY/CATCH block! 😛

    That's an excellent point - I didn't even considered that when I hastily wrote the script for a project that is only used in the USA.

    Although, you could easily modify it to return a real or float if there's a possibility that your deployment might include a time zone that would return an offset requiring additional precision (e.g. Newfoundland, Canada in North America).