Golden Falcon
Member
Hello. I'm trying to display the current date and time in a theme.
What I originally did was just make a PHP file:
And then using a <xen:callback> block.
I realized after that this was bad because it didn't take account the member's different timezones, so I'm going to assume this will just display the server time, which I don't want.
I see there is this
But it doesn't work when I try to put it into a header file. I'm trying to wrap the user's current time inside a <span>
Thank you
What I originally did was just make a PHP file:
PHP:
public static function getHtml() {
$today = date("l , F j - g:i a");
//Sunday , August 31 - 8:09 am
return $today;
}
And then using a <xen:callback> block.
I realized after that this was bad because it didn't take account the member's different timezones, so I'm going to assume this will just display the server time, which I don't want.
I see there is this
Code:
<xen:date time="$datetime" />
But it doesn't work when I try to put it into a header file. I'm trying to wrap the user's current time inside a <span>
Thank you