Jump to content

Recommended Posts

Hi All:

I purchased a script for an online auction site and have it up and running and have noticed a few problems, which have all been solved except for this one.

From what i understand the time shown is obtained from wherever my server is located. (I confirmed this with my provider) I did add a line in the script to have it show my time zone by using this command.[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--] putenv("TZ=US/Pacific");[!--colorc--][/span][!--/colorc--] except I used mountain standard time.

This worked and the correct time and date appeared on my main page. The problem occurs when people list an item, or place a bid, or leave feedback. The time is uses for these functions is wrong. It is either -4 or -6 hours. When I remove that line from the template.php page, the time shown for all functions is still -4 hours from the time shown on the screen.

I asked the people I purchased the script from and they say that the time is obtained from the server, not from the script.

Any ideas on what needs to happen to get the time appearing correctly on all functions. Ultimately, I would like to be able to use mountain standard time, but would be happy with Eastern Time, or anytime, as long as they all were the same.

I really don't know how to change much, so if you have suggestions, please keep it simple, as I could be considered Stupid, when it comes to this.

This is the lines "I think" that relate to this problem. If you think there are other lines, please let me know. I have taken these lines from a file called "template.php"
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
$config=mysql_fetch_array(mysql_query("select * from sbauctions_config "));
///////////////////////////////////////////AUTOLIST CODE////////////////////////////////////////////////
$auction_period=$config["max_period"];
$rs_query=mysql_query("Select *,UNIX_TIMESTAMP(date_submitted) as t,UNIX_TIMESTAMP(DATE_ADD(date_submitted,INTERVAL auction_period DAY)) as t1 from sbauctions_products");[/quote]

AND

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]/////////////////////////////////////AUTOLISTED//////////////////////////////////////////////////////////

$sbq_frozen_q="select * from sbauctions_products where UNIX_TIMESTAMP(DATE_ADD(date_submitted,INTERVAL auction_period DAY)) <= UNIX_TIMESTAMP(NOW()) and status='open'";
//echo $sbq_frozen_q;
$frozen_q=mysql_query($sbq_frozen_q);
while($frozen=mysql_fetch_array($frozen_q))
{
autoclose($frozen["id"]);[/quote]
another question, is there an area on here to post requests for quotations on modifications to my script. The company I purchased it from is not happy with me, as I asked them to fix the script to what I originally requested, and didn't want to pay more $$ for them to correct their errors. It is all fixed now, but there are some changes we would like to make, and I am not sure this company will do it for me.

If it makes a difference, i am in Canada, and prefer to deal with someone who is close to the same time zone, as when dealing with someone who is +12 hours, it is hard to connect when trying to sort out issues.

Thanks,

Ken
Link to comment
https://forums.phpfreaks.com/topic/13144-what-time-is-it/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

  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.

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