Jump to content

time problems


chris_rulez001

Recommended Posts

The date() function simple returns the system time from the machine it is being run on. If the server clock is set to a different time zone that the computer you are accessing it form (and want it to be the same), change the system time zone on the server running the php.

 

Just clarifying,

date_default_timezone_set — Sets the default timezone used by all date/time functions in a script
Link to comment
https://forums.phpfreaks.com/topic/65321-time-problems/#findComment-326219
Share on other sites

How do you mean?

 

bool date_default_timezone_set ( string $timezone_identifier )

 

Example:

<?php
date_default_timezone_set('BST');
echo date('D-M-Y');
?>

 

Edit: made life easier.

 

im getting a:

 

Fatal error: Call to undefined function: date_default_timezone_set() in /home4/thunder/public_html/support/index.php on line 117

Link to comment
https://forums.phpfreaks.com/topic/65321-time-problems/#findComment-326222
Share on other sites

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.