Jump to content

[SOLVED] easy date problem


dreamci

Recommended Posts

i just use this

 

putenv('TZ=Australia/Sydney');
$time= ''.date('Y-m-d--H:i:s-A').'';
echo $time;

 

it will show in this format:

2008-07-12--22:33:46-PM

 

heres more info which youll probly need:

timezones: http://au2.php.net/datetime

how to display the time(eg  hour/minute/second): http://au2.php.net/manual/en/function.date.php

i just use this

 

putenv('TZ=Australia/Sydney');
$time= ''.date('Y-m-d--H:i:s-A').'';
echo $time;

 

it will show in this format:

2008-07-12--22:33:46-PM

 

heres more info which youll probly need:

timezones: http://au2.php.net/datetime

how to display the time(eg  hour/minute/second): http://au2.php.net/manual/en/function.date.php

 

The OP wanted to convert time() into a date string.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.