Top

Name

forget_timezone — returns its first argument as a timezoned value

Synopsis

datetime forget_timezone ( in dt datetime ,
  in ignore_timezone integer );
 

Description

The function returns its first argument as a timezoned value. If the first argument is timezoneless then it is returned unchanged. If the first argument is timezoned and second argument is missing or zero then the result is timezoneless value that "looks like" local time notation. If the first argument is timezoned and second argument is nonzero then the value is first made GMT and then it becomes timezoneless.

Parameters

dt

Datetime value.

ignore_timezone

Flag

Examples

Example 24.58. Simple example

SQL> select cast (forget_timezone (cast ('1999-12-31 11:59+02:00' as datetime)) as varchar);
VARCHAR
'1999-12-31 11:59:00'
No. of rows in result: 1