Top

Name

dt_set_tz — modifies the timezone component of a datetime

Synopsis

dt_set_tz ( in dt datetime ,
  in tz integer );
 

Description

This modifies the timezone component of a datetime. The value remains equal for purposes of comparison but will look different when converted to a string. The timezone component is an offset from UTC in minutes. It can be retrieved with the timezone function.

Timezoneless: The function returns its first argument with unchanged GMT value but new timezone offset. Unlike adjust_timezone() , if the argument is timezoneless then no error is signaled.

Parameters

dt

The original DATETIME .

tz

INTEGER new timezone offset.

Return Types

A DATETIME with the new timezone set