Need Help with Date Conversion to Session Timezone
I have an application that is used by users across the country. It reads from a table in a centrally located database. It needs to convert a standard date type field in the table to the timezone of the user.
I initially wrote a function, TO_STZ to convert a date to the sessiontimezone that essentially takes the difference between dbtimezone and sessiontimezone and adjust the date by the difference: