summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/deprecated/datetime.php
diff options
context:
space:
mode:
authorwn_ <invalid@email.com>2024-12-09 17:58:28 +0000
committerwn_ <invalid@email.com>2024-12-09 17:58:28 +0000
commitf6a8facfd4bfc40025c069eebc37094d826aff58 (patch)
tree871aab0d8adafe736d954cae1783c260699c0ec3 /vendor/thecodingmachine/safe/deprecated/datetime.php
parentcd2c10f9f71409df24fc74c1bbd7d5ddbf48d991 (diff)
Bump 'spomky-labs/otphp' to 11.3.x.
This is mainly for PHP 8.4 compatibility.
Diffstat (limited to 'vendor/thecodingmachine/safe/deprecated/datetime.php')
-rw-r--r--vendor/thecodingmachine/safe/deprecated/datetime.php36
1 files changed, 0 insertions, 36 deletions
diff --git a/vendor/thecodingmachine/safe/deprecated/datetime.php b/vendor/thecodingmachine/safe/deprecated/datetime.php
deleted file mode 100644
index 1bcb32275..000000000
--- a/vendor/thecodingmachine/safe/deprecated/datetime.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\DatetimeException;
-
-/**
- * Identical to the date function except that
- * the time returned is Greenwich Mean Time (GMT).
- *
- * @param string $format The format of the outputted date string. See the formatting
- * options for the date function.
- * @param int $timestamp The optional timestamp parameter is an
- * integer Unix timestamp that defaults to the current
- * local time if a timestamp is not given. In other
- * words, it defaults to the value of time.
- * @return string Returns a formatted date string. If a non-numeric value is used for
- * timestamp, FALSE is returned and an
- * E_WARNING level error is emitted.
- * @throws DatetimeException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- *
- */
-function gmdate(string $format, int $timestamp = null): string
-{
- error_clear_last();
- if ($timestamp !== null) {
- $result = \gmdate($format, $timestamp);
- } else {
- $result = \gmdate($format);
- }
- if ($result === false) {
- throw DatetimeException::createFromPhpError();
- }
- return $result;
-}