Title: Problem with getdate()
Last modified: August 20, 2016

---

# Problem with getdate()

 *  [ddmcleod](https://wordpress.org/support/users/ddmcleod/)
 * (@ddmcleod)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/problem-with-getdate/)
 * I have a very simple function that relies on getdate() (a standard PHP function).
   However, I noticed a very bizarre behavior: when I invoke my function from outside
   a WordPress context the function returns dates in the local timezone. When I 
   invoke the exact same function from within a WordPress context, the function 
   returns dates in gmt!! How can this be? I don’t see any WordPress override of
   this function, so I’m very confused about why this is happening. Any help would
   be greatly appreciated.
 * Thank you.
 * David

The topic ‘Problem with getdate()’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 0 replies
 * 1 participant
 * Last reply from: [ddmcleod](https://wordpress.org/support/users/ddmcleod/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/problem-with-getdate/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
