xoops forums

fosterm

Just popping in
Posted on: 2005/9/11 20:41
fosterm
fosterm (Show more)
Just popping in
Posts: 93
Since: 2005/8/7 2
#1

Changing Date/Time Format in them 7dana-soft

Hi.

I am using XOOPS 2.2.3(2.2.2rc). I am also using the 7dana-soft theme.

I wanted to change the date/time format that appears at the top left of that theme.

I accomplished this by changing the format in modifier.date_format.php
FromQuote:
function smarty_modifier_date_format($string, $format="%b %e, %Y", $default_date=null)


to
Quote:
function smarty_modifier_date_format($string, $format="%B %e, %Y | %I:%M %p", $default_date=null).


I also changed the javascript clock( <script language="JavaScript" type="text/javascript" src="<{$xoops_imageurl}>images/clock.js">
</script>) in theme.html to

the shorty version....{$smarty.now|date_format}


This accomplished my needed change in the format, but now the time is 1 hour ahead of my local time. It seems to be using the servers time only(-5). I am (-6) in my time zone.

I have tried setting the time in my user profile(made no change no matter what i set it to), as well as in Preferences...General Settings...None of those setting seem to effect the time.

Anyone able to help me out a bit? Did I modify the wrong files?

Thanks
Foz
http://www.thewoodlandsmonitor.com/testsite

noisia

Not too shy to talk
Posted on: 2006/1/12 3:39
noisia
noisia (Show more)
Not too shy to talk
Posts: 123
Since: 2004/8/24
#2

Re: Changing Date/Time Format in them 7dana-soft

I have the same issue. My webserver is one hour different from my own timezone.

I have tried
{$smarty.now|date_format:"%A, %B %e, %Y| %I+1:%M %p"}

but then the time just shows like this
11+1:43 AM


so that is no good.

There must be a way to calculate it, right?

I have also tried to change the time zones in the admin. There is the server time zone setting and the main time zone setting, but they do not seem to affect the $smarty.now

Any help would be greatly appreciated.