Jump to content

Time localisation ability


goldeagle

Recommended Posts

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....

Link to comment
Share on other sites

  • WHMCS CEO

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

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

Thanks for this. I've been looking for this for a long time and have now found how to do it, thanks.:-P

 

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...
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

Link to comment
Share on other sites

  • 2 months later...
  • 11 months later...
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.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated