how to change the way date is displayed

  • Anonymous
  • Topic Author
  • Visitor
  • Visitor
18 years 9 months ago #41 by Anonymous
how to change the way date is displayed was created by Anonymous
In earlier version of the this brilliant guestbook, the dat ewas shown as for example like this: 8th December

In your new script the date is shown like this: 12/08/05

I cant remeber if i edited soemthing in the add.php script to change the date similar to the first example shown, cant remeber...

Where to chnage the layout of the date so it shown like this: 8th December ??

looking forward to an answer...

Please Log in or Create an account to join the conversation.

More
18 years 9 months ago #42 by Pete
Hello ferale,

Please open the file "add.php" and find the following line:
Code:
$date = date("D m/j/y g:iA");

Replace this line with the old date format line, which used to be:
Code:
$date = date("H:i, jS F");

This will change the date format from the new format to the old format that we used to use.

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

More
18 years 4 months ago #90 by CarlosTheTackle
Hi Pete,

how do you adjust the server timezone offset? Or even better, can it be configured to show time/date correct for each user's timezone?

C

Please Log in or Create an account to join the conversation.

More
18 years 4 months ago #91 by Pete

CarlosTheTackle wrote: how do you adjust the server timezone offset? ...


Hello Carlos,

It depends what kind of Operating System and Server Software your Web Server is running.

CarlosTheTackle wrote: ... Or even better, can it be configured to show time/date correct for each user's timezone?


Technically you could add a small function to do this calculation for you. But you would have to ask the user first what timezone they are in. So it would be an extra step to view the guestbook. Else, you could add a variable into the config.php file to add a specific number of hours to the post date of the messages. Currently however, the guestbook does not support this feature.

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

More
18 years 4 months ago #93 by CarlosTheTackle

Pete wrote:

CarlosTheTackle wrote: how do you adjust the server timezone offset? ...


Hello Carlos,

It depends what kind of Operating System and Server Software your Web Server is running.

It's a Linux server, running a standard LAMP config. Public hosting at bluehost.com

Pete wrote:

CarlosTheTackle wrote: ... Or even better, can it be configured to show time/date correct for each user's timezone?


Technically you could add a small function to do this calculation for you. But you would have to ask the user first what timezone they are in. So it would be an extra step to view the guestbook. Else, you could add a variable into the config.php file to add a specific number of hours to the post date of the messages. Currently however, the guestbook does not support this feature.


Sounds too complicated and unnecessary at this stage.

Thanks heaps for the reply.

Cheers,
Carlos

Please Log in or Create an account to join the conversation.

More
18 years 4 months ago #99 by thetech

ferale wrote: (in part said) Where to chnage the layout of the date so it shown like this: 8th December ??


In addition to what Pete has said, you can also add the year which would make the code line in add.php look like this $date = date("H:i, jS F, Y."); there are many many ways to display the date, lots of useful information on the code layout here
www.plus2net.com/php_tutorial/php_date_format.php

Please Log in or Create an account to join the conversation.

Time to create page: 0.123 seconds
Powered by Kunena Forum