Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Can time be set to 24h instead of am/pm ?  (Read 2655 times)

0 Members and 1 Guest are viewing this topic.

golf16vkr

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Can time be set to 24h instead of am/pm ?
« on: February 23, 2004, 08:37:19 pm »

Can time be set to 24h instead of am/pm ?

Thanks again.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Can time be set to 24h instead of am/pm ?
« Reply #1 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
Code: [Select]
// 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
Logged

golf16vkr

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Can time be set to 24h instead of am/pm ?
« Reply #2 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Can time be set to 24h instead of am/pm ?
« Reply #3 on: February 24, 2004, 10:02:30 am »

edit your language file and find
Code: [Select]
$lastcom_date_fmt =  '%m/%d/%y @ %I:%M';Replace it with
Code: [Select]
$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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Can time be set to 24h instead of am/pm ?
« Reply #4 on: February 24, 2004, 11:59:44 am »

Slight alteration to the code to change, which has '%p' which also needs to go, ie,

Code: [Select]
$lastcom_date_fmt =  '%m/%d/%y @ %I:%M %p';

replace with the code gaugau said.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.