Title: Getting local time
Last modified: August 20, 2016

---

# Getting local time

 *  [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [15 years ago](https://wordpress.org/support/topic/getting-local-time/)
 * Is there a simple way, within WordPress, to get the visitors local time?
 * Looking at the codex, `current_time('mysql')` says it should but, well, doesn’t–
   I assume when it refers to “local time” is means the administrators, as per the
   general settings page.
 * Of course, I’m aware PHP is server side so will only return the server time, 
   in preference to JavaScript which can provide the client side time.
 * However, is there a way within, say, a WP plugin to get the visitors time?
 * David.

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

 *  [zamb0n](https://wordpress.org/support/users/zamb0n/)
 * (@zamb0n)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/getting-local-time/#post-2091066)
 * hello there! any luck with your question? i have exactly the same problem…
 *  Thread Starter [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/getting-local-time/#post-2091067)
 * No, never found an answer – other than to use JavaScript.
 * David.

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

The topic ‘Getting local time’ is closed to new replies.

## Tags

 * [client](https://wordpress.org/support/topic-tag/client/)
 * [local](https://wordpress.org/support/topic-tag/local/)
 * [server](https://wordpress.org/support/topic-tag/server/)
 * [time](https://wordpress.org/support/topic-tag/time/)

 * 2 replies
 * 2 participants
 * Last reply from: [David Artiss](https://wordpress.org/support/users/dartiss/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/getting-local-time/#post-2091067)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
