Gossamer Forum
Quote Reply
user date format
Hi,

I am using the below in a global to show the time of the last link added and it works ok - except it takes the date format from another Links Installation that I have (in another language) - is there a way to tell GT::Date to use a specific Date definition. (I am talking about the definition of the weeksdays, months etc in the setup)


Code:
sub {
lib->import('/path/to/admin');
require GT::SQL;
my $search_db = GT::SQL->new('/path/to/admin/defs')->table('Links');
my ($output,$sth,$link);
$search_db->select_options ('ORDER BY Add_Time DESC Limit 1');
$sth = $search_db->select ( { isValidated => 'Yes' });
while (my $link = $sth->fetchrow_hashref) {
$output = $link->{Add_Time} = GT::Date::date_transform ($link->{Add_Time}, "%yyyy%-%mm%-%dd% %HH%:%MM%:%ss%", "%dddd%, %mmmm% %dd% at %HH%:%MM%" );
}
return $output;
}

http://www.ameinfo.com
Subject Author Views Date
Thread user date format klauslovgreen 3536 Apr 26, 2003, 1:12 AM
Thread Re: [klauslovgreen] user date format
Paul 3465 Apr 26, 2003, 2:06 AM
Thread Re: [Paul] user date format
klauslovgreen 3457 Apr 26, 2003, 2:23 AM
Thread Re: [klauslovgreen] user date format
Paul 3461 Apr 26, 2003, 2:26 AM
Post Re: [Paul] user date format
klauslovgreen 3471 Apr 26, 2003, 3:08 AM