You are here

public function DatexObject::xsetDatetime in Datex 7.2

Set date-time of object instance by extracting timestamp from given date.

Treat datetime as a Gregorian date.

File

datex_api/datex_api.class.inc, line 274
Provides an API to work with dates.

Class

DatexObject
Base class for localized DateTime.

Code

public function xsetDatetime($datetime, $tz = NULL) {
  $this
    ->checkSetTimezone($tz);
  $date = $this
    ->xobjectFromDate($datetime);
  $this
    ->setTimestamp($date
    ->getTimestamp());
  return $this;
}