forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: JohnM-UK on February 23, 2008, 01:23:35 pm

Title: Date on last additions and last comments
Post by: JohnM-UK on February 23, 2008, 01:23:35 pm
For some reason my gallery is not displaying the dates correctly on last additions - http://www.oneuk.f2s.com/photos/ and last comments - http://www.oneuk.f2s.com/photos/thumbnails.php?album=lastcom&cat=0 It is just saying the month and year ie. Feb 2008 or .02.08 at 22:33 for comments
I compared it with someone elses gallery to see if it was something common and it appears it is just mine. Here is one I compared it with:
http://www.republichog.org/gallery/
As you can see on this gallery the date is displayed correctly for last additions (Feb 22, 2008) and last comments (07/08/07 at 21:10)
Title: Re: Date on last additions and last comments
Post by: Stramm on February 23, 2008, 02:10:22 pm
Check your server clock or ask your host to do so.
Title: Re: Date on last additions and last comments
Post by: JohnM-UK on February 23, 2008, 02:35:57 pm
Would that be the same for anything on my site? I currently have a phpbb forum on there which displays the correct time for posts...
"Posted: Sat Feb 23, 2008 1:34 pm"
Title: Re: Date on last additions and last comments
Post by: Nibbler on February 23, 2008, 02:36:31 pm
The british english lang file using a date format that is not supported on windows. You can change the date format in the lang file or remove the lang file to use us english instead.
Title: Re: Date on last additions and last comments
Post by: JohnM-UK on February 23, 2008, 03:55:29 pm
Brilliant! Thanks, all working now. If I may just share this solution for other readers...


In 'lang\english_gb.php' overwrite this:

Code: [Select]
$album_date_fmt =    '%e.%B %Y';
$lastcom_date_fmt =  '%e.%m.%y at %H:%M';
$lastup_date_fmt = '%e %B %Y';
$register_date_fmt = '%e %B %Y';
$lasthit_date_fmt = '%e %B %Y at %H:%M';
$comment_date_fmt =  '%e %B %Y at %H:%M';
$log_date_fmt = '%e %B, %Y at %I:%M %p'; //cpg1.4

With this from:
lang\english.php (line 54)

Code: [Select]
$album_date_fmt =    '%B %d, %Y';
$lastcom_date_fmt =  '%m/%d/%y at %H:%M';  // switch %m and %d to get the english date format
$lastup_date_fmt = '%B %d, %Y';
$register_date_fmt = '%B %d, %Y';
$lasthit_date_fmt = '%B %d, %Y at %I:%M %p';
$comment_date_fmt =  '%B %d, %Y at %I:%M %p';
$log_date_fmt = '%B %d, %Y at %I:%M %p'; //cpg1.4

Should now correctly display:
Date of last file upload in each album in 'Album List'
Date of file upload in 'Last Additions'
Date and time of comment in 'Last Comments' view (Format: 20/02/08 at 22:33)
Date and time of comment next to comment (Format: [Feb 20, 2008 at 10:33 PM])

Title: Re: Date on last additions and last comments
Post by: Joachim Müller on February 23, 2008, 05:38:59 pm
@Nibbler: should be moved to bugs if such a flaw has made it into english_gb.php, don't you agree?
Title: Re: Date on last additions and last comments
Post by: Nibbler on February 23, 2008, 05:41:04 pm
I already posted a bug report with more information. See http://forum.coppermine-gallery.net/index.php/topic,50648.0.html