Name

adjust_timezone — returns its first argument with unchanged GMT value but new timezone offset, as it is specified by the second argument

Synopsis

datetime adjust_timezone ( in dt datetime ,
in tz_offset integer ,
in ignore_timezone integer );

Description

The function returns its first argument with unchanged GMT value but new timezone offset, as it is specified by the second argument. If the first argument is timezoneless and third argument is missing or zero then error 22023 is signaled. If the first argument is timezoneless and third argument is nonzero then no error is signaled and the argument is handled like it is a GMT value.

Parameters

dt

Datetime value.

tz_offset

Timezone offset.

ignore_timezone

Flag.

Examples

Example24.60.Simple example

SQL> SELECT adjust_timezone(cast('2014-12-31 15:00-12:00' as datetime),0,1) ;
DATETIME
2015-01-01 03:00:00
No. of rows in result: 1