coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: golf16vkr on February 23, 2004, 08:37:19 PM

Title: Can time be set to 24h instead of am/pm ?
Post by: golf16vkr on February 23, 2004, 08:37:19 PM
Can time be set to 24h instead of am/pm ?

Thanks again.
Title: Can time be set to 24h instead of am/pm ?
Post by: Joachim Müller on February 24, 2004, 08:33:44 AM
actually, the time is set in your language file, using the time options that are most widely used in the countries where your language is spoken.
Edit your language file (lang/yourlanguage.php), and look for// The various date formats
// See http://www.php.net/manual/en/function.strftime.php to define the variable below
$album_date_fmt =    '%B %d, %Y';
$lastcom_date_fmt =  '%m/%d/%y @ %H:%M';
$lastup_date_fmt = '%B %d, %Y';
$register_date_fmt = '%B %d, %Y';
$lasthit_date_fmt = '%B %d, %Y @ %I:%M %p';
$comment_date_fmt =  '%B %d, %Y @ %I:%M %p';
(this is from the english language file).
What time do you want to change exactly? Please provide a deep link...

GauGau
Title: Can time be set to 24h instead of am/pm ?
Post by: golf16vkr on February 24, 2004, 09:21:50 AM
Well I would like it as follows :

Last comment posted 21:13 instead of 09:13 pm

[Feb 23, 2004 @ 08:02 PM] would like it to be [Feb 23, 2004 @ 20:02]

btw this goes for the comment section, here is an example :

http://66.98.210.46/vwscene.nl/gallery/displayimage.php?album=5&pos=0
Title: Can time be set to 24h instead of am/pm ?
Post by: Joachim Müller on February 24, 2004, 10:02:30 AM
edit your language file and find $lastcom_date_fmt =  '%m/%d/%y @ %I:%M';Replace it with$lastcom_date_fmt =  '%m/%d/%y @ %H:%M';For details (as suggested above) go to http://www.php.net/manual/en/function.strftime.php

GauGau
Title: Can time be set to 24h instead of am/pm ?
Post by: Casper on February 24, 2004, 11:59:44 AM
Slight alteration to the code to change, which has '%p' which also needs to go, ie,

$lastcom_date_fmt =  '%m/%d/%y @ %I:%M %p';

replace with the code gaugau said.