WordPress uses GMT. The only way to get around that is to declare a new timezone after the header to use for your own purposes. Kind of a pain.
Also see this answer: How to get WordPress Time Zone setting?
Related Posts:
- WordPress returns a wrong date
- display month in french in wordpress/php?
- Get date numerical and separate?
- Print last modified date only on posts
- How to get User Time Zone in WordPress?
- Get date function not working
- If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page
- WordPress wrong dates bug
- Can’t add to time? [closed]
- Adding a number to a date
- Display Year and Month from custom field + Age Calculator
- Convert custom field date format to “WordPress default”
- How to get WordPress Time Zone setting?
- Converting timestamps to local time with date_l18n()
- To close or not to close php
- Any guides on creating custom admin pages?
- Displaying a WooCommerce product via PHP
- What exactly does “Posts page” do in WordPress?
- Check if a menu is empty?
- WordPress Template Engine?
- Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress
- wp_remote_get returns an error for valid URL
- Blank on static home page?
- Adjust the results quantity for Search Results page pagination
- Exclude pages with certain template from wp_list_pages
- Adding Field to Profile “Name”
- Categories Template Assistance
- Add a Custom Class to Admin Menus
- Is it possible to use the featured image of a page as a css background without inlining?
- WP_Query meta_query results date by date
- Placing the_content inside shortcode not working
- Way to display “Yesterday”, “Today”
- How to override wp-admin styling
- An unwanted inline style is added to my body tag
- Admin Options page. Save as Array
- How can I load a PHP page without using a Template?
- how could I load a different template part by page
- Selectbox in admin panel function linking to CSS
- Sort custom meta column by other meta value
- Get and insert order email address to the PHP template inside HTML text
- code is skipping a div
- Programmatically create page when saving custom post type post
- How to manually change current date to post date in frontend?
- how to show only specific category for a template
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]
- Using same variable names in files added with get_template_part()
- Add filter multiple times using only one master function
- Create a Blog Template Page
- Showing latest post without 301 redirect
- WordPress template page name displayed on screen
- 3 different times on my WordPress website
- single.php with different look by category
- retain querystring values when savincustom options in admin
- Get categories names as an array to use it in theme settings
- Removing WordPress Footer -without access to PHP code?
- Adding conditional text to a PHP Shortcode Template
- how to display this functions?
- is_page_template showing partial results
- Adding regular php file to site
- Template Loop – add switch case php
- Post repeated when opening in overlay, how do I solve this? [closed]
- How can I get “Previous” and “Next” to show in the navigation besides the links?
- Splitting the_content() by size?
- Gravity Forms merge tags in templates?
- Unable to render custom field after attempt to generate a list of recent post in page template
- php loading different structure than source code
- pass html code to worpdress
- Adding a ‘style=’ bit to image_send_to_editor output
- Limit ‘contributers’ abilities in WordPress
- Prevent header and footer from loading on specific pages with template or plugin
- Woocommerce display orders with products from specific categories to specific admins
- Require()/Include() post template adding extra content
- Display metabox galleries on specific page template in admin editor
- Display WordPress archive template page in 3 columns and not 1 column [closed]
- Run do_shortcode on php template using JS function
- Change the “Show All” button in a WordPress Portfolio Filter
- No more get_option(‘date_time’) in WordPress 5.5?
- Don’t update modified post date when user add a product review or comment?
- Get posts from year from URL
- Primary navigation menu with timed items from custom post type
- How to pull date/time in french format for wordpress post?
- If is_page elseif is_page not working like I want it to
- Grouping posts by date
- How to display last whole post on the homepage
- missing admin bar and widget in a template
- My own theme’s custom widget areas are not working
- Add point on excerpt post
- wordpress ajax return 0
- WooCommerce – Print Processing orders [closed]
- Loop returns more items than exist?
- Dynamic form variables for post meta
- How to call a certain object/menubar in a PHP file
- how to register a second page-template
- why is markup routinely placed in functions in wordpress?
- If I define a variable in header.php, how do I make it available to templates?
- Forbid certain users to access a specific page
- Loop on a wordpress Page instead of content coming from the WP text editor
- Display Current Time using shortcode
- How can one use variables in a template or template part without polluting the global scope?
- Need Help With Making Full-Width Template for Blog Posts (common methods aren’t working)