From b91ac6c7f08465b36e9d1b38ebc9b223dc17dd4a Mon Sep 17 00:00:00 2001 From: Gary Jones Date: Thu, 20 Jun 2019 13:16:27 +0200 Subject: [PATCH 1/2] Docs: Add TimezoneChange XML doc See #1722. --- WordPress/Docs/WP/TimezoneChangeStandard.xml | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 WordPress/Docs/WP/TimezoneChangeStandard.xml diff --git a/WordPress/Docs/WP/TimezoneChangeStandard.xml b/WordPress/Docs/WP/TimezoneChangeStandard.xml new file mode 100644 index 0000000000..08ed87f6b6 --- /dev/null +++ b/WordPress/Docs/WP/TimezoneChangeStandard.xml @@ -0,0 +1,22 @@ + + + + + + + setTimezone( + new DateTimeZone( 'America/Toronto' ) +); + ]]> + + + + + + From c6e560b272f442d74418b6f7ae5ac1e5bd81b47b Mon Sep 17 00:00:00 2001 From: Gary Jones Date: Mon, 28 Mar 2022 16:50:20 +0100 Subject: [PATCH 2/2] Docs: Refresh restricted datetime functions docs Kept the descriptions for individual code comparisons simpler, and populated the element with more description instead. --- .../DateTime/RestrictedFunctionsStandard.xml | 50 +++++++++++++++++++ WordPress/Docs/WP/TimezoneChangeStandard.xml | 22 -------- 2 files changed, 50 insertions(+), 22 deletions(-) create mode 100644 WordPress/Docs/DateTime/RestrictedFunctionsStandard.xml delete mode 100644 WordPress/Docs/WP/TimezoneChangeStandard.xml diff --git a/WordPress/Docs/DateTime/RestrictedFunctionsStandard.xml b/WordPress/Docs/DateTime/RestrictedFunctionsStandard.xml new file mode 100644 index 0000000000..c8cc932cc9 --- /dev/null +++ b/WordPress/Docs/DateTime/RestrictedFunctionsStandard.xml @@ -0,0 +1,50 @@ + + + + + + + + + + DateTime(); +$date->setTimezone( + new DateTimeZone( 'Europe/Amsterdam' ) +); + ]]> + + + date_default_timezone_set( 'Europe/Amsterdam' ); + ]]> + + + + + + + + gmdate( + 'Y-m-d\TH:i:s', + strtotime( $plugin['last_updated'] ) +); + ]]> + + + date( + 'Y-m-d\TH:i:s', + strtotime( $plugin['last_updated'] ) +); + ]]> + + + diff --git a/WordPress/Docs/WP/TimezoneChangeStandard.xml b/WordPress/Docs/WP/TimezoneChangeStandard.xml deleted file mode 100644 index 08ed87f6b6..0000000000 --- a/WordPress/Docs/WP/TimezoneChangeStandard.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - setTimezone( - new DateTimeZone( 'America/Toronto' ) -); - ]]> - - - - - -