I think that it is better to use unixtimestamps and if you save them to a RDBMS then save according to GMT. When retrieving use timezone to convert to your local time - ex
define('MY_TIMEZONE',-2); list($time) = mysql_fetch_array(mysql_query('select tstamp from table where user='.$user_id.';')); $tt_ar = explode(':',gmstrftime('%H:%M:%S:%m:%d:%Y',$time)); $local_time = gmmktime($tt_ar[0]+MY_TIMEZONE, $tt_ar[1], $tt_ar[2],$tt_ar[3],$tt_ar[4],$tt_ar[5]); Regards, Andrey ----- Original Message ----- From: "Manisha" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 17, 2002 9:55 AM Subject: [PHP] Require some help about the date comparison > I am writing one program - > > I want to display some text on web. This text should appear for limited > period e.g from 20th July 12pm till 25th July 3pm. After 25th July 3pm the > text should disappear from screen. > > I tried to look for date comparison / string conversion to date etc, I got > lot info but could not figure out which would be best for above (rather how > can I do it). > > Anybody can share some expert comments please ? > > Thanking in advance, > Manisha > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php