Title: [Plugin: WP to Twitter] Time differences issue
Last modified: August 20, 2016

---

# [Plugin: WP to Twitter] Time differences issue

 *  Resolved [dionsis](https://wordpress.org/support/users/dionsis/)
 * (@dionsis)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/)
 * Hi I logged a support ticket but never got a response.
 * I am on WP to Twitter Pro
 * I am connected and configured, however currently there seems to be a time issue
   between Twitter and WordPress.
 * I am in Dublin
    Current local time is 13:36 Twitter server time is showing at
   12:36
 * I assume Twitter has multiple time servers for across the world. What way are
   you deciding which Twitter server to connect to? Basically how can I tell Twitter
   to use IRISH time?
 * [http://wordpress.org/extend/plugins/wp-to-twitter/](http://wordpress.org/extend/plugins/wp-to-twitter/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000680)
 * Does WP to Twitter work for you? Are you able to post? If so, then this is an
   irrelevant error. There is no way to change what time Twitter will return; the
   query is sent against Twitter’s API; which is the same server that you will then
   perform authentication against and post to. If you need to change the time of
   your server, that has to be done locally.
 * The time returned by the WP to Twitter local query is the current Unix timestamp,
   which is NOT a local time; it is measured as GMT. If your timestamp is returning
   something other than GMT, then that means that the time on your server is incorrect.
   A one hour difference frequently means that the server missed a daylight savings
   time change at some point.
 * Regarding your support ticket – can you tell me what web site that was logged
   from? I have not received a support ticket with this query, but I’ll check for
   it.
 *  Thread Starter [dionsis](https://wordpress.org/support/users/dionsis/)
 * (@dionsis)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000683)
 * It seems to post, but the scheduling appears to take a good while to post. Sometimes
   an hour.
 * I am in Dublin, which is GMT, but GMT is returning a value of 15:40. The actual
   time in Dublin is 16:40. This makes no sense.
 * Even not stopping the posting, it definitely stops my writers adding their Twitter
   accounts via their profiles. The time gap is given at the reason it could not
   connect.
 * So there is a problem somewhere, my server time reads as it should, 16:42. Twitter
   time and subsequently GMT time does not read correctly.
 * Site posted from is Goldenplec.com for the support ticket.
 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000714)
 * First, to the best of my knowledge, Dublin is NOT in GMT, which is the same as
   Western European Time; it’s in Irish Standard Time, and is an hour different.
 * I did receive your support request, and answered it – perhaps you don’t receive
   email at the address I replied to? It was the administrative address for your
   web site. (I won’t post it here.)
 *  Thread Starter [dionsis](https://wordpress.org/support/users/dionsis/)
 * (@dionsis)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000718)
 * admin <at> goldenplec – Yeah I get mails at that. Never received anything.
 * OK I’ve checked, Dublin is not GMT, but I have my server set to GMT +1 and it’s
   still coming out an hour behind.
 * Basically I’m very confused as to the time settings.
 * My WordPress settings page is set to Dublin it tells me
    UTC time is 2012-08-
   28 20:25:20 Local time is 2012-08-28 21:25:20
 * My console from root of the server says
    19:25:20 and that clock is set to GMT
   +1
 * root@server:/home/acuffe# dpkg-reconfigure tzdata
    Current default time zone:‘
   Etc/GMT-1’ Local time is now: Tue Aug 28 21:28:42 GMT-1 2012. Universal Time 
   is now: Tue Aug 28 20:28:42 UTC 2012.
 * root@server:/home/acuffe# dpkg-reconfigure tzdata
    Current default time zone:‘
   Europe/Dublin’ Local time is now: Tue Aug 28 21:28:57 IST 2012. Universal Time
   is now: Tue Aug 28 20:28:57 UTC 2012.
 * I’ve just set it to
    Current default time zone: ‘Etc/GMT’ Local time is now: 
   Tue Aug 28 20:30:40 GMT 2012. Universal Time is now: Tue Aug 28 20:30:40 UTC 
   2012.
 * This is now the correct time on my local machine.
 * When I click into WP to Twitter Pro I get
    Your server time: Tuesday, 28-Aug-
   12 20:31:29 UTC. Twitter’s current server time: Tuesday, 28-Aug-12 19:31:29 UTC.
 * and Settings->General currently says
    UTC time is 2012-08-28 20:31:21 Local time
   is 2012-08-28 21:31:21
 * I don’t know why there is such a wild variance in time, I don’t know how to configure
   it so that everything matches. I want my Twitter time to match my server time,
   but the time you are giving top of your plugin says both are UTC
 * So why are they UTC and can this be the problem?
 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000719)
 * So, I just did some research, and I’m finding that although time() always returns
   UTC, PHP apparently always reports it (if formatted using date(), which it is,
   because a straight timestamp is pretty useless), using a timezone set in PHP.
   So, it sounds like your timezone in PHP is what’s incorrect.
 * You can set this in php.ini using the date.timezone setting.
 * Documentation: [http://php.net/manual/en/datetime.configuration.php](http://php.net/manual/en/datetime.configuration.php)
 * This is the first I’ve read about this, so I can’t say exactly what you need 
   to do, but this might help.
 *  Thread Starter [dionsis](https://wordpress.org/support/users/dionsis/)
 * (@dionsis)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000720)
 * I have set the Timezone to Europe\Dublin
 * I have restarted Apache
 * Time is still an hour apart between your timestamps
 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000786)
 * All things considered, my opinion is that there’s a time setting somewhere in
   your server which is not correct. I don’t know what it might be — I’m not a server
   administrator, and don’t know every level of setting that might be relevant —
   but the time testing in WP to Twitter is accurate if the information received
   is accurate.
 *  Thread Starter [dionsis](https://wordpress.org/support/users/dionsis/)
 * (@dionsis)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000795)
 * How does your application request server time from Twitter
 * Can you show me the command ran to get time so I can try figure this out. My 
   times are all correct here. I need to figure out what you are calling to figure
   why Twitter time is an hour off
 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000796)
 * Simplified, it’s this:
 *     ```
       $response = wp_remote_get( "https://api.twitter.com/1/" );
       $date = date( DATE_COOKIE, strtotime($response['headers']['date']) );
       echo $date;
       ```
   
 * There’s a variety of other things going on in there as well, but that’s the essentials
   of the time query.
 *  Thread Starter [dionsis](https://wordpress.org/support/users/dionsis/)
 * (@dionsis)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000797)
 * so your taking back a number of variable back from the account 1 and taking the
   date data from the header data.
 * How does the 1 account know to be on my timezone? Should we not be passing in
   my account?
 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000799)
 * It doesn’t; none of the references are specifying a particular timezone. All 
   times should be handled in UTC. The query to your server is
 *     ```
       time()
       ```
   
 * Which returns a Unix timestamp; which is in UTC by definition. If that timestamp
   does NOT return in UTC, that means that the time is wrong at some level on your
   server.
 *  Thread Starter [dionsis](https://wordpress.org/support/users/dionsis/)
 * (@dionsis)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000800)
 * does time not track the length of time to execute a query
 * or is it time() in PHP
 * I’ve set my server back to 11pm now. Even though it’s midnight here.
 * It means I have all my time stuff matches up but if I schedule something for 
   12 midday it won’t post till 1pm. It’s rather confusing. But I need my time stamps
   to match up. When your twitter tool tries to schedule the main account tweet,
   it is an hour late otherwise.
 * it’s rather confusing.
 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000807)
 * No, time() simply reports the current UNIX timestamp.
 * Is your WordPress timezone correct? If scheduling is a problem, you may need 
   to mesh that timezone.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘[Plugin: WP to Twitter] Time differences issue’ is closed to new replies.

 * ![](https://ps.w.org/wp-to-twitter/assets/icon-256x256.png?rev=2997308)
 * [XPoster - Share to Bluesky and Mastodon](https://wordpress.org/plugins/wp-to-twitter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-to-twitter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-to-twitter/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-to-twitter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-to-twitter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-to-twitter/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-to-twitter-time-differences-issue/#post-3000807)
 * Status: resolved