goldeagle Posted January 30, 2008 Share Posted January 30, 2008 Hi all, I have already spoken to Matt about this, but I think 1 useful feature which isnt present at the moment is the ability to localise the time. A simple drop down box showing GMT +/- etc. This is especially useful for those resellers who are not in the same country as the server but want their local timestamps on invoices and tickets. Mainly because the server wants to keep the time of its location.... 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted January 30, 2008 WHMCS CEO Share Posted January 30, 2008 There is already an option for this in the configuration file by setting the $timeoffset value to what you require. However, as of PHP 5.1.0 you can also add a line like the one below to the configuration.php file to achieve the same result: date_default_timezone_set('GMT'); Matt 0 Quote Link to comment Share on other sites More sharing options...
goldeagle Posted January 30, 2008 Author Share Posted January 30, 2008 There is already an option for this in the configuration file by setting the $timeoffset value to what you require. Ok novice coming out again here. Do you mean set it in the configuration.php file as $timeoffset = "+6" or "GMT" or is there another way ? 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted January 31, 2008 Share Posted January 31, 2008 I've put something like: $timeoffset = "6" And a lot of the dates had not changed. I'm yet to try the second method Matt said though. 0 Quote Link to comment Share on other sites More sharing options...
superr Posted February 1, 2008 Share Posted February 1, 2008 This works. I used the example Matt gave: date_default_timezone_set('GMT'); If you replace the GMT with your timezone listed here: http://www.php.net/manual/en/timezones.php it will work for you:) This is what mine looks like: date_default_timezone_set('America/Los_Angeles'); 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted February 2, 2008 Share Posted February 2, 2008 Cool thanks. Will give it a go. 0 Quote Link to comment Share on other sites More sharing options...
Telfie Posted April 24, 2008 Share Posted April 24, 2008 Sorry ... not the sharpest tool in the shed when it comes to WHMCS at the moment ... Is this what the configuration.php in the root directory should look like? <?php $license="xxxxxxxxx"; $db_host = "localhost"; $db_username = "xxxxxxxx"; $db_password = "xxxxxxxx"; $db_name = "xxxxxxx_whmcs"; $cc_encryption_hash = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $templates_compiledir = "templates_c/"; $date_default_timezone_set('Australia/Sydney');?> When I do this it throws up errors relating to unknown function ... Thanks 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted April 25, 2008 Share Posted April 25, 2008 Remove the $ from the start of 'date_default_timezone_set(.....' 0 Quote Link to comment Share on other sites More sharing options...
Telfie Posted April 25, 2008 Share Posted April 25, 2008 nope ... sorry that doesn't work ... I get Fatal error: Call to undefined function: date_default_timezone_set() in /home/reliable/public_html/configuration.php on line 9 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted April 25, 2008 Share Posted April 25, 2008 date_default_timezone_set() requires PHP 5.1.0 or higher. What version are you running? Try this instead: putenv("TZ=Australia/Sydney"); 0 Quote Link to comment Share on other sites More sharing options...
Telfie Posted April 25, 2008 Share Posted April 25, 2008 Running PHP 5.2.5 Have used the putenv and it does appear to be working correctly. Will see what happens when it spits out the invoices Thanks 0 Quote Link to comment Share on other sites More sharing options...
Telfie Posted April 25, 2008 Share Posted April 25, 2008 mmm just noticed something ... when I look at the home page summary, the 'active admins' is blank. I am signed in, even logged out and signed back in to be sure. 0 Quote Link to comment Share on other sites More sharing options...
scouthostinguk Posted April 27, 2008 Share Posted April 27, 2008 Thanks for this. I've been looking for this for a long time and have now found how to do it, thanks. There is already an option for this in the configuration file by setting the $timeoffset value to what you require. However, as of PHP 5.1.0 you can also add a line like the one below to the configuration.php file to achieve the same result: date_default_timezone_set('GMT'); Matt 0 Quote Link to comment Share on other sites More sharing options...
PPH Posted April 28, 2008 Share Posted April 28, 2008 mmm just noticed something ... when I look at the home page summary, the 'active admins' is blank. I am signed in, even logged out and signed back in to be sure. I have noticed the same in 3.6. Not sure when it started but noticed it about a week ago. 0 Quote Link to comment Share on other sites More sharing options...
dreamcon Posted June 10, 2008 Share Posted June 10, 2008 Running PHP 5.2.5 Have used the putenv and it does appear to be working correctly. Will see what happens when it spits out the invoices Thanks For those that this solution did not work. Is there a .htaccess file in your public/html folder? Do you have the correct TZ setting for your location. For me in NSW, Australia the setting is - setEnv TZ Australia/Sydney If you don't know your setting look here http://en.wikipedia.org/wiki/List_of_zoneinfo_timezones 0 Quote Link to comment Share on other sites More sharing options...
MultiHosts Posted September 7, 2008 Share Posted September 7, 2008 GMT setting worked ok, but is still an hour out on the actual time. What have I done wrong? 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted September 7, 2008 Share Posted September 7, 2008 Look for a city that is the same time zone you are in. 0 Quote Link to comment Share on other sites More sharing options...
DeanClinton Posted September 7, 2008 Share Posted September 7, 2008 Try setting it at Europe/London or BST and see if it makes a difference. 0 Quote Link to comment Share on other sites More sharing options...
MultiHosts Posted September 7, 2008 Share Posted September 7, 2008 BST set the time to 3.30 in the afternoon, but Europe/London worked perfectly. Thanks so much 0 Quote Link to comment Share on other sites More sharing options...
bphillips1972 Posted August 31, 2009 Share Posted August 31, 2009 This works. I used the example Matt gave: date_default_timezone_set('GMT'); If you replace the GMT with your timezone listed here: http://www.php.net/manual/en/timezones.php it will work for you:) This is what mine looks like: date_default_timezone_set('America/Los_Angeles'); This worked for me, thanks. It was driving me crazy. People would open tickets and the time was wrong. 0 Quote Link to comment Share on other sites More sharing options...
rangermoore Posted September 10, 2009 Share Posted September 10, 2009 Thanks, Very nice 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.