Home
last modified time | relevance | path

Searched refs:datetime (Results 1 – 25 of 64) sorted by relevance

123

/php-src/ext/date/tests/
H A Dbug73489.phpt6 $datetime = new DateTime('2016-11-09 20:00:00', new DateTimeZone('UTC'));
7 var_dump($datetime->getTimestamp());
8 $datetime->setTimeZone(new DateTimeZone('-03:00'));
9 $datetime->setTimeZone(new DateTimeZone('-03:00'));
10 var_dump($datetime->getTimestamp());
13 $datetime = new DateTime('2016-11-09 20:00:00', new DateTimeZone('UTC'));
14 var_dump($datetime->getTimestamp());
15 $datetime->setTimeZone(new DateTimeZone('-03:00'));
16 $datetime->getTimestamp();
17 $datetime->setTimeZone(new DateTimeZone('-03:00'));
[all …]
H A Ddate_time_set_basic1.phpt11 $datetime = date_create("2009-01-31 15:14:10");
13 echo "Initial date: " . date_format($datetime, DATE_RFC2822) . "\n";
15 date_time_set($datetime, 17, 20);
16 echo "After modification1 " . date_format($datetime, DATE_RFC2822) . "\n";
18 date_time_set($datetime, 19, 05, 59);
19 echo "After modification2 " . date_format($datetime, DATE_RFC2822) . "\n";
21 date_time_set($datetime, 24, 10);
22 echo "After modification3 " . date_format($datetime, DATE_RFC2822) . "\n";
24 date_time_set($datetime, 47, 35, 47);
25 echo "After modification4 " . date_format($datetime, DATE_RFC2822) . "\n";
[all …]
H A DDateTime_setTime_basic1.phpt11 $datetime = new DateTime("2009-01-31 15:14:10");
13 echo "Initial date: " . $datetime ->format(DATE_RFC2822) . "\n";
15 $datetime->setTime(17, 20);
16 echo "After modification1 " . $datetime ->format(DATE_RFC2822) . "\n";
18 $datetime->setTime(19, 05, 59);
19 echo "After modification2 " . $datetime ->format(DATE_RFC2822) . "\n";
21 $datetime->setTime(24, 10);
22 echo "After modification3 " . $datetime ->format(DATE_RFC2822) . "\n";
24 $datetime->setTime(47, 35, 47);
25 echo "After modification4 " . $datetime ->format(DATE_RFC2822) . "\n";
[all …]
H A Ddate_modify_basic1.phpt11 $datetime = date_create("2009-01-31 14:28:41");
13 date_modify($datetime, "+1 day");
14 echo "After modification 1: " . date_format($datetime, "D, d M Y") . "\n";
16 date_modify($datetime, "+1 week 2 days 4 hours 2 seconds");
17 echo "After modification 2: " . date_format($datetime, "D, d M Y H:i:s") . "\n";
19 date_modify($datetime, "next Thursday");
20 echo "After modification 3: " . date_format($datetime, "D, d M Y") . "\n";
22 date_modify($datetime, "last Sunday");
23 echo "After modification 4: " . date_format($datetime, "D, d M Y") . "\n";
H A DDateTime_modify_basic1.phpt11 $datetime = new DateTime("2009-01-31 14:28:41");
13 $datetime->modify("+1 day");
14 echo "After modification 1: " . $datetime->format("D, d M Y") . "\n";
16 $datetime->modify("+1 week 2 days 4 hours 2 seconds");
17 echo "After modification 2: " . $datetime->format("D, d M Y H:i:s") . "\n";
19 $datetime->modify("next Thursday");
20 echo "After modification 3: " . $datetime->format("D, d M Y") . "\n";
22 $datetime->modify("last Sunday");
23 echo "After modification 4: " . $datetime->format("D, d M Y") . "\n";
H A Dbug-gh11368.phpt2 Bug GH-11368: Date modify returns invalid datetime
8 $datetime = date_create('2023-06-04');
10 $datetime->setTime(1,1,1,1 /* If set to any other number, it works fine */);
11 var_dump($datetime);
13 $datetime->modify('-100 ms');
14 var_dump($datetime);
H A DDateTime_setISODate_basic1.phpt11 $datetime = new DateTime("2009-01-30 17:57:32");
14 $datetime->setISODate(2008, 40);
15 echo "Week 40 of 2009 is in \"" . $datetime->format("F") . "\"\n";
18 $datetime->setISODate(2009, 30, 3);
19 echo "Week 30 day 3 of 2009 is \"" . $datetime->format("D M j") . "\"\n";
22 $datetime->setISODate(2008, 30, 3);
23 echo "..same day last year was \"" . $datetime->format("D M j") . "\"\n";
H A Ddate_isodate_set_basic1.phpt11 $datetime = date_create("2009-01-30 17:57:32");
14 date_isodate_set($datetime, 2008, 40);
15 echo "Week 40 of 2009 is in \"" . date_format($datetime, "F") . "\"\n";
18 date_isodate_set($datetime, 2009, 30, 3);
19 echo "Week 30 day 3 of 2009 is \"" . date_format($datetime, "D M j") . "\"\n";
22 date_isodate_set($datetime, 2008, 30, 3);
23 echo "..same day last year was \"" . date_format($datetime, "D M j") . "\"\n";
H A Dgh11455.phpt7 string $datetime = "now",
11 parent::__construct($datetime, $timezone);
15 $datetime = new MyDateTimeImmutable('2022-12-22T11:26:00Z', myProperty: new stdClass);
16 $datetime->myProperty->field = str_repeat("hello", 3);
17 $serialized = serialize($datetime);
18 var_dump($datetime->myProperty);
H A Ddate_timezone_set_basic1.phpt10 $datetime = date_create("2009-01-30 17:57:32");
11 $tz = date_timezone_get($datetime);
14 $datetime = date_create("2009-01-30 22:57:32");
17 date_timezone_set($datetime, $la_time);
18 $tz = date_timezone_get($datetime);
H A Ddate_date_set_basic1.phpt10 $datetime = date_create("2009-01-30 19:34:10");
12 echo date_format($datetime, DATE_RFC2822) . "\n";
14 date_date_set($datetime, 2008, 02, 01);
16 echo date_format($datetime, DATE_RFC2822) . "\n";
H A DDateTime_setDate_basic1.phpt10 $datetime = new DateTime("2009-01-30 19:34:10");
12 echo $datetime->format(DATE_RFC2822) . "\n";
14 $datetime->setDate(2008, 02, 01);
16 echo $datetime->format(DATE_RFC2822) . "\n";
H A Dgh10152.phpt8 string $datetime = "now",
12 parent::__construct($datetime, $timezone);
16 $datetime = new MyDateTimeImmutable('2022-12-22T11:26:00Z', myProperty: true);
17 $serialized = serialize($datetime);
H A DDateTime_setTimezone_basic1.phpt10 $datetime = new DateTime("2009-01-30 17:57:32");
11 echo "Default timezone: " . date_timezone_get($datetime)->getName() . "\n";
14 $datetime->setTimezone($la_time);
15 echo "New timezone: " . date_timezone_get($datetime)->getName() . "\n";
H A Dbug79716.phpt5 $datetime = new \DateTimeImmutable(
9 \var_dump($datetime->format('j') === '0');
10 \var_dump($datetime);
H A DDateTime_modify_invalid_format.phpt6 $datetime = new DateTime;
7 var_dump(date_modify($datetime, ''));
9 var_dump($datetime->modify(''));
H A Dbug76770.phpt2 Bug #76770 'U' modifier in 'datetime::createFromFormat' adds seconds to other specifiers
5 var_dump(datetime::createFromFormat('U H', '3600 01')->getTimestamp());
H A Dbug43527.phpt6 $datetime = new DateTime('Fri, 07 Dec 2007 19:05:14 +1000');
7 echo $datetime->getTimezone()->getName(), "\n";
H A Dtimezone_offset_get_error.phpt35 echo "\n-- Testing timezone_offset_get() function with an invalid values for \$datetime argument --…
69 -- Testing timezone_offset_get() function with an invalid values for $datetime argument --
70 string(96) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, stdCl…
72 string(91) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, int g…
74 string(92) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, null …
H A DDateTimeImmutable_modify_invalid_format.phpt6 $datetime = new DateTimeImmutable;
8 var_dump($datetime->modify(''));
/php-src/ext/intl/common/
H A Dcommon_date.cpp116 php_date_obj *datetime; in intl_datetime_decompose() local
130 datetime = Z_PHPDATE_P(z); in intl_datetime_decompose()
131 *millis = U_MILLIS_PER_SECOND * (double)Z_LVAL(retval) + (datetime->time->us / 1000); in intl_datetime_decompose()
136 php_date_obj *datetime; in intl_datetime_decompose() local
137 datetime = Z_PHPDATE_P(z); in intl_datetime_decompose()
138 if (!datetime->time) { in intl_datetime_decompose()
146 if (!datetime->time->is_localtime) { in intl_datetime_decompose()
149 *tz = timezone_convert_datetimezone(datetime->time->zone_type, in intl_datetime_decompose()
150 datetime, 1, NULL, func); in intl_datetime_decompose()
/php-src/Zend/tests/type_declarations/variance/internal_parent/
H A Dunresolvable_inheritance_check_return.phpt7 public static function createFromFormat($format, $datetime, $timezone = null): Wrong { }
12 …createFromFormat($format, $datetime, $timezone = null): Wrong and DateTime::createFromFormat(strin…
H A Dunresolvable_inheritance_check_param.phpt7 …public static function createFromFormat($format, $datetime, ?Wrong $timezone = null): DateTime|fal…
12 …omFormat($format, $datetime, ?Wrong $timezone = null): DateTime|false and DateTime::createFromForm…
/php-src/ext/date/
H A Dphp_date.stub.php104 function strtotime(string $datetime, ?int $baseTimestamp = null): int|false {} argument
155 string $datetime = "now", ?DateTimeZone $timezone = null): DateTimeImmutable|false {} argument
159 string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false {} argument
169 function date_parse(string $datetime): array {} argument
175 function date_parse_from_format(string $format, string $datetime): array {} argument
223 function timezone_offset_get(DateTimeZone $object, DateTimeInterface $datetime): int {} argument
254 function date_interval_create_from_date_string(string $datetime): DateInterval|false {} argument
346 public function __construct(string $datetime = "now", ?DateTimeZone $timezone = null) {} argument
463 public function __construct(string $datetime = "now", ?DateTimeZone $timezone = null) {} argument
602 public function getOffset(DateTimeInterface $datetime): int {} argument
[all …]
/php-src/ext/session/tests/
H A Dgh13680.phpt19 public static function createFromFormat($format, $datetime, $timezone = null): Wrong {}
25 …createFromFormat($format, $datetime, $timezone = null): Wrong and DateTime::createFromFormat(strin…

Completed in 82 milliseconds

123