Showing date and time by visitor's computer time zone

1.3k Views Asked by At

I want my wordpress posts and comment date and time to be converted to visitors computer time zone. That way user should know what exact time post or comment was created by his local time.

I know that cloaking is bad seo practice when you show different things for search engine and visitor. Could it be considered as cloaking? Would this practice affect SEO?

1

There are 1 best solutions below

0
On

As mentioned by the comment from swapnesh, you can use the javascript code here to get the time on the clients machine:

How can I get the user's local time instead of the server's time?

The effect of having a javascript that updates the div elements related to time (in order to be in the clients time) is negligible.

In addition, your javascript can check the user-agent: User agent detection to include js file in order to further limit when the specific javascript is run (though is is overkill as most crawlers do not execute javascript_.

Finally, in relation to your use of the term cloaking, according to http://en.wikipedia.org/wiki/Cloaking "Cloaking is an SEO optimization technique..."