Wednesday, December 30, 2009

PHP: date functions usage

PHP have two families of date functions.
date(), time(), mktime() functions calculate time in current server time zone. These functions complicated, when need compare time in different time zones. For this kind task php have gmtime() gmdate() gmmktime() functions, these functions return Greenwich Mean Time, which are same in all world and ignore current server time zone.

You can change time zone with date_default_timezone_set function. Supported time zones list you can find here

No comments:

Post a Comment

 
Software