Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-10 17:01:58

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

visitor's time?

Using PHP, how do I show the visitor’s server/local time?


<txp:Ruhh />

Offline

#2 2008-05-10 17:44:57

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: visitor's time?

<txp:php>
echo date("d. M Y, H:i:s");
</txp:php>

throw out, what you don’t need.

Last edited by uli (2008-05-10 18:06:59)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2008-05-11 07:49:12

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: visitor's time?

Check this page for the different letters you can use to get the format the way you want it.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2008-05-11 08:29:06

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: visitor's time?

If the keyword in this question is ‘visitor’, then you need client-side Javascript instead of PHP.

Offline

#5 2008-05-11 10:31:23

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: visitor's time?

Yeah, the only way to show a visitor’s date/time is with JavaScript.

Offline

#6 2008-05-11 16:00:14

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: visitor's time?

Ahh I knew it needed Javascript. I was just hoping it could be done with PHP.


<txp:Ruhh />

Offline

Board footer

Powered by FluxBB