How to create a container above the inbox with UTC time?

Thanks. Exactly what I was looking for. The positioning is spot on!

time.webp


Is it possible to format the time/date string so the output is HH:SS with a string value of "UTC" to the right of the time?
 
Is it possible to format the time/date string so the output is HH:SS with a string value of "UTC" to the right of the time?

Code:
<div style="float: right;">
{xen:datetime $serverTime, 'absolute'} UTC
</div>

But as I said before, the time is not in UTC. It uses the timezone of the current logged in user. You will find that if you change your timezone the reported time will change.
 
Unfortunately I don't know of any template function or other method to output a specific time zone. The time zone is available in the visitor array, but only as a string (e.g. ["timezone"] => string(19) "America/Los_Angeles") which can't be used for an offset calculation.
 
Is it possible to use some other PHP time variables?

It's possible with a template hook listener. Here is a code example of a template hook:

http://xenforo.com/community/threads/how-to-create-a-bridge.28515/#post-331631

For your purposes you can use the "ad_header" hook which will insert your content in the ad_header template.

Then you need to write the code to build the current time string in UTC and append it to the $contents of the hook.

If you are not a programmer then you can post a request:

http://xenforo.com/community/forums/custom-service-development-requests.69/
 
Top Bottom