Go Back   HTMLCenter Web Development Forums > Web Design and Development > Programming and Scripting

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-28-2006, 09:16 PM
Registered User
 
Join Date: Jun 2006
Posts: 10
Time won't appear correctly

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. putenv("TZ=US/Pacific"); 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"



Quote:
$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");
AND



Quote:
/////////////////////////////////////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"]);

Thanks,

Ken
Reply With Quote

  #2 (permalink)  
Old 06-30-2006, 02:28 AM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
I don't see where any "formatting" on the time would be done. When you retrieve data through SQL, what matters is the "SELECT foo, bar FROM ..."-part. And since you just select everything (= *), there is no formatting applied to any timestamps.

My advice would be to query the one you purchased the script from. Since you spent money for a reason, might as well get them to support you.

This is too vague anyway.
Reply With Quote
  #3 (permalink)  
Old 06-30-2006, 02:35 AM
Registered User
 
Join Date: Jun 2006
Posts: 10
My apologies for not posting my results from all the people I spoke with.

The server and the database server are in two different time zones, heck, even two different countries. (Canada and Alaska) and as such the time is being posted according to the function being completed.

Ken
Reply With Quote
  #4 (permalink)  
Old 06-30-2006, 02:38 AM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
The server is in a different timezone than the database server?

What's always good is to save your time and date in GMT (Greenwich Meridian Time), and from GMT you convert to whereever you are at. That makes it the most easiest to deal with customers from different countries and so on.

Just a thought though.
Reply With Quote
  #5 (permalink)  
Old 06-30-2006, 02:41 AM
Registered User
 
Join Date: Jun 2006
Posts: 10
I purchased the script premade and really have no clue how to change it..... having said that I am changing server providers next week, and hopefully won't have any problems.

Ken
Reply With Quote
  #6 (permalink)  
Old 07-01-2006, 08:47 AM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
Quote:
Originally Posted by kenwvs
I purchased the script premade and really have no clue how to change it..... having said that I am changing server providers next week, and hopefully won't have any problems.

Ken
Maybe it would be in your own interest to hire someone. You'd create a job too and you have someone to get it done. Like a student/intern.
Reply With Quote
  #7 (permalink)  
Old 07-01-2006, 08:54 AM
Registered User
 
Join Date: Jun 2006
Posts: 10
I have actually hired someone to modify the script, and it is being done as we speak.

Once that is completed I may very well have another project or two.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Management-An essential factor for home based worker! ezyjobtrade Off-Topic 2 07-05-2006 12:10 AM
Am I coding Sendmail correctly? NevadaSam Programming and Scripting 5 05-09-2006 11:20 AM
Its me again...Macromedia Flash this time CatRita Graphics and Flash 1 10-25-2005 08:09 PM
Hi Guys. First Time Poster quinn623 Programming and Scripting 1 03-17-2005 06:28 PM
Content that Responds to the time marker on a RealMedia video svoltmer Programming and Scripting 1 03-15-2005 04:54 PM


All times are GMT -5. The time now is 01:52 AM.

 
KickApps
Clicky Web Analytics


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter