Correctly handle timezone in time and timestamp values

most of the databases store time and timestamp in the GMT timezone,
so the time and timestamp in other timezones need to be converted
to GMT before being used