Title: Wrong day outputted for date(&quot;d&quot;);
Last modified: August 20, 2016

---

# Wrong day outputted for date("d");

 *  [1s0s.com](https://wordpress.org/support/users/nsanden/)
 * (@nsanden)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wrong-day-outputted-for-dated/)
 * When i use echo date(“d”); in any place of my blog I get the next day (at least
   right now at 8:15pm on the 5/24/2012).
 * First thought was maybe my server time is wrong, but I checked that and it confirms:
   root@server1 [~]# date
    Thu May 24 20:16:49 PDT 2012
 * Then i thought maybe my timezone was wrong in wordpress settings and it was set
   to UTC-7 so I changed that to America – Los Angeles but it didn’t fix it still.
   Also when creating a post, it used the 24th.
 * Then I thought maybe my php.ini setting was wrong, but I checked that and its
   using: date.timezone=”America/Los_Angeles”
 * Anyone have any other ideas, is this something simple i’m missing? Thanks

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

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wrong-day-outputted-for-dated/#post-2769384)
 * Try using date_i18n() instead of date().
 *  Thread Starter [1s0s.com](https://wordpress.org/support/users/nsanden/)
 * (@nsanden)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wrong-day-outputted-for-dated/#post-2769436)
 * Hi, this worked, thank you. So what does that mean? Why isn’t date() working 
   like expected?
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wrong-day-outputted-for-dated/#post-2769446)
 * As I understand it, the Linux/Unix date command, and date_i18n(), take into account
   the timezone. The PHP date() function does not.

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

The topic ‘Wrong day outputted for date("d");’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/wrong-day-outputted-for-dated/#post-2769446)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
