Gossamer Forum
Home : Products : Gossamer Links : Discussions :

current data and time

Quote Reply
current data and time
What is the code for globals that display data and time,Whistle
Sunday 28 July, 2011, 10:15
Quote Reply
Re: [nir] current data and time In reply to
Try this global (totally untested);

get_current_date_stamp
Code:
sub {
GT::Date::set_date_format("%dddd% %dd% %mmmm%, %yyyy%, %HH%:%MM%");
my $date = GT::Date::date_get();
GT::Date::set_date_format("%yyyy%-%mm%-%dd%"); # set back to yyyy-mm-dd format, otherwise can cause other problems
return $date;
}


..then just call with:

<%get_current_date_stamp%>

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] current data and time In reply to
Thanks
can I change the language of the day and mouth?
Quote Reply
Re: [nir] current data and time In reply to
Yup, in Setup > Date I believe

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] current data and time In reply to
I change it in the set but it now change in the global.
I change in the global the function set_date_format to date_set_format as the first give en error, can it be the cause?
Quote Reply
Re: [nir] current data and time In reply to
Sorry?

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] current data and time In reply to
I change the data language in the Setup > Date but it not help.


In the global that you submit there was an error with the
GT::Date::set_date_format("%dddd% %dd% %mmmm%, %yyyy%, %HH%:%MM%");
so I change is to
GT::Date::date_set_format("%ddd% %dd% %mmmm%, %yyyy%, %HH%:%MM%");


Do you think this is the reason why I get the date in English?
Quote Reply
Re: [nir] current data and time In reply to
Ah actually, I think it may be due to a bug in GT::Date, where its actually hard-coded into the .pm file. Open up /admin/GT/Date.pm, and search for "January" to see if you can find it in there (afraid I'm a bit busy atm to check myself ;))

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] current data and time In reply to
Thanks, its solve the problem.Smile
Quote Reply
Re: [nir] current data and time In reply to
Cool Cool

Hopefully GT will fix that up in the next version - as I've had that problem before on another site where they needed to be translated Whistle

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] current data and time In reply to
Andy wrote:
Cool Cool

Hopefully GT will fix that up in the next version - as I've had that problem before on another site where they needed to be translated Whistle

Cheers

Next update?!?! Are you kidding Wink

Matthias
gpaed.de