Forums

Getting local time (3 posts)

  1. dartiss
    Member
    Posted 1 year ago #

    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.

  2. zamb0n
    Member
    Posted 2 months ago #

    hello there! any luck with your question? i have exactly the same problem...

  3. dartiss
    Member
    Posted 2 months ago #

    No, never found an answer - other than to use JavaScript.

    David.

Topic Closed

This topic has been closed to new replies.

About this Topic