Chuyển đến nội dung
Tài liệu

Tra cứu lớp và hàm

DateTime

Danh sách các phương thức công khai của lớp Zittme\Framework\DateTime. Tài liệu này được tạo tự động từ mã nguồn lõi Zittme.

Nguồn: common/framework/DateTime.php

Phương thức công khai

  • static function formatTimestamp(string $format, ?int $timestamp = null)
  • Format a Unix timestamp using the internal timezone.
  • static function formatTimestampForCurrentUser(string $format, ?int $timestamp = null)
  • Format a Unix timestamp for the current user's timezone.
  • static function getTimezoneForCurrentUser()
  • Get the current user's timezone.
  • static function getTimezoneList()
  • Get the list of time zones supported on this server.
  • static function getTimezoneOffset(string $timezone, ?int $timestamp = null)
  • Get the absolute (UTC) offset of a timezone.
  • static function getTimezoneOffsetFromInternal(string $timezone, ?int $timestamp = null)
  • Get the relative offset between a timezone and Zittme's internal timezone.
  • static function getTimezoneOffsetByLegacyFormat(string $timezone)
  • Get the absolute (UTC) offset of a timezone written in XE legacy format ('+0900').
  • static function getTimezoneNameByOffset(int $offset)
  • Get a PHP time zone by UTC offset.
  • static function getRelativeTimestamp(?int $timestamp = null)
  • Get a relative timestamp (3 hours ago, etc.)