Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The tag has no usage guidance.

1
vote
0answers
14 views

UTC/local time in Worpdress

Problem is the one several post already has displayed : I've updated one of our wordpress from 4.6.1 to last version. Local time of server is not UTC and WordPress inside general options show a UTC ...
1
vote
0answers
20 views

Convert CST published date time to MST timezone

My WordPress install is using "Chicago" timezone as the general setting, would like to convert published date time to MST timezone in one of my sections (front-end display) Any suggestions? Thanks in ...
0
votes
1answer
16 views

Change wordpress current_time function to different timezone

I'm using plugin to set the earliest possible date for order delivery in woocommerce. Piece of code below: $current_time = current_time( 'timestamp' ); if( $prdd_minimum_delivery_time != '...
0
votes
0answers
35 views

How to get the correct date depending on the current visitor timezone?

I want to change the date format for my custom post types from dates to time. So i starting using this code: echo get_post_time('g:i A', TRUE, get_the_ID(), TRUE ); It's working successfully but ...
2
votes
1answer
171 views

filter date and time to differents time zone

Any way to filter/change the display time only on the front-end with hook? Unfortunately, I can't adjust the timezone in General>Settings because it sets imported posts using Zulu as scheduled ...
1
vote
0answers
25 views

Make WordPress use timezone for email Date header

My WordPress installations send emails with the Date header specified in UTC: Date: Wed, 18 Jul 2018 15:18:50 +0000 I would prefer that the mail be sent with dates encoded in localtime, which is ...
0
votes
1answer
170 views

How to check for WordPress timezone type?

If you choose a city as a timezone it will save to the "timezone_string" option but if you choose a Manual Offset (UTC+1 for instance) it is saved to the "gmt_offset" option if you need the ...
2
votes
1answer
135 views

Timezone Settings: “UTC” and “local” times are incorrect

On the "General Settings" page of my WordPress site, it's not displaying the correct UTC and local times (see screenshot below). The displayed UTC and local times are wrong. It should say that local ...
0
votes
0answers
19 views

Timezone Setting (Localizing Users Time)

I want to be able to localize the time to the specific users locale at some point (for example for user comments) so I set my install to use UTC. Recently an update to "The Events Calendar" (v4.16.17)...
1
vote
1answer
22 views

Wordpress outputs mm/dd but it should be opposite

As an example, after update 4.9.5, my wordpress site outputs this timestamp in timezone settings: 2018-04-05 (5th of april) My site is set to Danish, and in Denmark the timeformat is dd/mm. The ...
0
votes
0answers
339 views

How to create a timezone dropdown list with javascript or jQuery with options having value as gmt offset?

I am trying to do something that is partially given over here.I want to create a dropdown list of timezones over the globe and having values of the timezone option tags as their respective. Kindly ...
0
votes
0answers
35 views

Force WP_Query to work in a local timezone [duplicate]

I have a template that displays an actual event if we have a today one, or a next future one. The template uses this WP_Query, that compares events date with the actual date: $args = array( '...
3
votes
2answers
797 views

PHP function showing wrong time in WordPress

My local WordPress installation on XAMPP seems to have a wrong time setting. When I do date( 'Y-m-d H:i:s' ); I get 2017-02-21 10:46:43 as result. However my PCs time really is 2017-02-21 11:46:43, ...
0
votes
1answer
175 views

Is there any way to get a drop down list of time zones?

How can I access the time zone list in drop down similar to the time zone selector in the settings? I want the time zones to be similar to the exact list of the what is in the settings page. I ...
0
votes
1answer
310 views

Get current week's day and time outside the loop

I am trying to get the current week's day and time based on WordPress time settings. So for today, I want to output Friday and 2:56 PM for the time. The the_time('l') and the_date('d') functions ...
0
votes
2answers
367 views

Translate current_time

I have current_time in theme and it displays date like: THURSDAY, NOVEMBER 10, 2016. But I need to translate it to Persian. How can I do this?
6
votes
1answer
93 views

Immediately published posts are scheduled and published 2 hours later

If I try to publish posts immediately, they get scheduled for the current time but are published 2 hours later. Also scheduled posts are published 2 hours after the planned time. In think its a ...
-1
votes
1answer
48 views

Can someone explain why wordpress uses two column for storing time values?

I see two table columns in wordpress tables for time values. Examples: post_date post_date_gmt post_modified post_modified_gmt comment_date comment_date_gmt What is the reason behind storing ...
5
votes
2answers
1k views

How to get WP to use EST Timezone

In my settings, I have New York defined as the time zone. But when I run plugins using PHP date() functions, I am getting a time zone of UTC as it shows in WP Admin > Settings > General. Edit: Here's ...
0
votes
1answer
188 views

User specified Timezone

After a lengthy break from WP i'm getting my hands dirty with quite a complex plugin which is coming along nicely, but right now i am at the point of needing some advice on quite a complex issue: ...
-1
votes
1answer
954 views

get_the_date() return always UTC+0 [duplicate]

I need to return correct ISO 8601 date format for my country (Poland, Warsaw). It should be UTC+1. I use function get_the_date() with argument "c". On General Settings in field Timezone I chosen "...
4
votes
3answers
3k views

How to convert DateTime() to display time based on WordPress timezone setting?

I need to use PHP's DateTime(). It's currently displaying GMT time instead of the time that's set for the timezone setting (EST) in the WordPress Admin. How can this be converted to show the the time ...
0
votes
1answer
750 views

date() returns incorrect value if used from WordPress theme, but correct otherwise

As I have mentioned in title if I use date('H') function in WP theme, it simply returns UTC time, but the server is set to use timezone Europe/Riga and the same is set in WP General settings. At the ...
0
votes
3answers
180 views

Timezone Change Locked Me Out? [closed]

I have a weird issue: I changed my timezone, hit "Save," and was immediately logged out of the admin panel. Now every time I try to access the dashboard after logging in I'm immediately logged out. ...
0
votes
1answer
334 views

Default Timezone setting in WordPress - is that global?

Despite the WordPress Options' Timezone setting for the whole WordPress installation, is it necessary to declare the default timezone in all the date/time places in a WP theme/plugins? ...
0
votes
1answer
763 views

How to get date using timezone saved in options? [duplicate]

This code does not work correctly and returns time using timezone from computer and ignoring timezone stored in WordPress options: date_default_timezone_set( get_option( 'timezone_string' ) ); $hours ...
0
votes
1answer
328 views

XML RPC post produces immediate revision with odd post_date_gmt

I am sending a post to Wordpress 3.8 with XML RPC. Here is the raw XML being sent to wordpress: <?xml version="1.0" encoding="UTF-8"?> <methodCall> <methodName>wp.newPost</...
0
votes
1answer
622 views

Possible to set new user's site time zone at user creation using Gravity Forms?

Let's say I have a multisite network running with Buddypress and has Gravity Forms installed with the GF User Registration addon. During new user/site registration, is there ANY way I can have the ...
2
votes
3answers
1k views

Date, Time, and Timezones

I am a bit confused about using dates/times along with timezones in WordPress. I have the following questions: What is the purpose of the timezone setting in the Admin -> Settings section? Assume ...
4
votes
1answer
873 views

When does next Cron Job run (time from now)?

I would need to know how much time is left between now and the next time a specifc Cron Job is done. For another answer I built a basic cron inspector plugin which can be found here. Reason I'm ...
3
votes
1answer
722 views

Trigger a cron every 24h GMT -8

I' like to run a cron every 24 hours at midnight PST ( = GMT -8 ) This is what I have if ( !wp_next_scheduled( 'cron_hook' ) ) { //reset on 00:00 PST ( GMT -8 ) == GMT +16 $timeoffset = ...
5
votes
1answer
1k views

User-Specific Timezones? Hack? Plugin?

Is there any way, whether it be a hack, a plugin, etc., to give users their own timezone? I am using a purchased SMS plugin. Users (my clients) login and are able to send out text messages when they ...
3
votes
3answers
2k views

Is it safe to use 'date_default_timezone_set' in plugin file?

I am using a sitemaps plugin which in very complex ways sets the timezone of <lastmod> (i.e. last modified time) for posts to GMT. Temporarily, until the plugin developer fixes it, I need to ...
3
votes
3answers
4k views

Why time functions show invalid time zone when using 'c' time format?

These are the functions I use in my theme to display the "entry-meta" which includes published and last modified dates (among others) of an article: // Shows Author and Published Date if ( ! ...
6
votes
2answers
6k views

Default timezone hardcoded as UTC?

While debugging a plugin I was writing, I noticed that on line 36 of wp-settings.php, the default timezone is hardcoded to UTC with a call to the date_default_set_timezone() function. This means any ...
0
votes
1answer
77 views

Wordpress time queries

When we setup the timezone in wordpress settings page. Does it changes the server time? If I call time(); does it returns unix time according to timezone setup in the settings page? I have checked ...
44
votes
6answers
44k views

How to get WordPress Time Zone setting?

Can someone tell me how to get the time zone that is set in the WordPress Admin? For example, if the blog is set to Eastern time, I need this exact string to print out: US/Eastern This is for a ...
1
vote
1answer
2k views

timestamp and scheduled post irregularities

Update: I've confirmed the problem (that scheduled posts are based on UTC time), now just need advice and background to determine best solution. Questions: 1) how WP determines UTC time before ...
0
votes
2answers
1k views

Summer/winter time - “daylight savings”

I have a wordpress site connected to an automated system that bases its work upon posts' modification date/time. In my timezone there have recently been a time swap and the operating system (linux) ...
1
vote
3answers
3k views

I get “The PHP Date/Time library is not supported by your web host.” on my CentOS host, what library to I need to install to add support?

I did some quick looking around, but my PHP skills are pretty nascent. I am sure there is just a package that needs installing. Edit to add additional information about the setup: Using: yum info ...