Change date/time format

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
ziopippo
Posts: 18
Joined: Tue Sep 05, 2006 10:43 am
Location: Italy

Change date/time format

Post by ziopippo »

I do apologize to the writers for any mistakes. :oops:

Q: How can i change date/time format whit my country standard?

R: Is too easy! You must only change some line of the code of your zm_config.php file.

The line to do change are:
#68

Code: Select all

define( "DATE_FMT_CONSOLE_LONG", "D jS M, g:ia" );		// This is the main console date/time, date() or strftime() format
#77

Code: Select all

define( "STRF_FMT_DATETIME_SHORT", "%y/%m/%d %H:%M:%S" ); // Strftime shorter format for dates with time, not locale aware
#78

Code: Select all

define( "STRF_FMT_DATETIME_SHORTER", "%m/%d %H:%M:%S" ); // Strftime shorter format for dates with time, not locale aware, used where space is tight


You must simply change the format of the date following the php format's date table. http://it2.php.net/date

Example:
Change the line 77 with this

Code: Select all

define( "STRF_FMT_DATETIME_SHORT", "%d/%m/%Y %H:%M:%S" );

The result is: 24/11/20006 18:33:40

Best Regards.

Ettore.
________
C77
User avatar
Frosty
Posts: 14
Joined: Sun Dec 07, 2014 4:16 pm

Can't find zm_conf.php

Post by Frosty »

I like this idea, but where the heck is "zm_config.php"?
Stay Frosty
Post Reply