Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 614537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:07:21+00:00 2026-05-13T18:07:21+00:00

A client of mine in Florida has a site hosted on a server in

  • 0

A client of mine in Florida has a site hosted on a server in Houston, TX. He is upset that all of his reports are coming out from the database a hour off. to insert records into the database, the MySQL Function time() is used, then a standard SELECT statements get the records out of the database. Is there some easy way I can modify the INSERT statement, or the SELECT statement to use the correct time zone.

Here is where the INSERT statement is being created:

  $query_rsCWAddOrder = sprintf("INSERT INTO tbl_orders 
  (order_ID, order_CustomerID, 
  order_Tax, order_Shipping, order_ShippingTax,
  order_Total, order_Status,
  order_ShipMeth_ID, order_Address1, 
  order_Address2, order_City,
  order_Zip, order_Country, 
  order_State, order_TransactionID, 
  order_Date, order_ShipName, order_DiscountID, 
  order_DiscountAmount, order_Comments) 
  VALUES ('%s','%s',%s,%s,%s,%s,'%s',%s,'%s','%s','%s','%s','%s','%s','%s',now(),'%s',%d, %s, '%s')",
  $thisOrderID
  , $_SESSION["customerID"]
  , mySQLFloat($cart["CartTotals"]["Tax"] )
  , str_replace('$', '', $_SESSION['SHIPPING_TOTAL']) 
  , mySQLFloat($cart["CartTotals"]["ShippingTax"] )
  , str_replace('$', '', $_SESSION['ORDER_TOTAL']) 
  , 2
  , $_SESSION["shipPref"] != 0 ? $_SESSION["shipPref"] : "NULL"
  , addslashes($shipToStreet)
  , addslashes($shipToStreet2)
  , addslashes($shipToCity)
  , addslashes($shipToZip)
  , addslashes($row_rsCWGetCustShipping["country_Code"])
  ,addslashes($row_rsCWGetCustShipping["stprv_Code"])
  , $transactionID 
  , addslashes($shipToName)
  , intval($_REQUEST["shippingDiscount"])
  , mySQLFloat($cart["CartTotals"]["ShippingDiscounts"])
  , addslashes($_SESSION["order_Comments"]));

and here is the select statement (but there are more reports with different select statements):

$query_rsCWGetStatus = sprintf("SELECT o.order_Status, o.order_Date, c.cst_Email 
 FROM tbl_orders o
 INNER JOIN tbl_customers c 
 ON c.cst_ID = o.order_CustomerID
 WHERE order_ID = '%s'",$_POST["orderID"]);
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:07:21+00:00Added an answer on May 13, 2026 at 6:07 pm

    From MySQL Reference:

    CONVERT_TZ(dt,from_tz,to_tz) converts a datetime value dt from the time zone given by from_tz to the time zone given by to_tz and returns the resulting value

    In your case, you need to decide if you want to do the conversion when inserting or when querying. Since you already have data, you should change your selects:

    SELECT o.order_Status, CONVERT_TZ(o.order_Date,'CST','EST'), ...
    

    or

    SELECT o.order_Status, CONVERT_TZ(o.order_Date,'-06:00','-05:00'), ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A client of mine has had his OpenX ad server hacked. This is the
A client of mine has a site in wordpress, with one section being a
A client of mine recently formatted his machine and re-installed MySQL Server and my
A client of mine has a full-Flash site and an HTML site (wordpress). Currently,
A client of mine has a site running on CodeIgniter (i did not create
A client of mine has a food blog hosted on WordPress. Each post entry
I'm writing an Android app for a client of mine that will display his
A client of mine somehow had his site lost/hacked/destroyed by gnomes and I have
I am working on this site for a client of mine. Issue is that
I have a SQL Server 2005 instance running and a client of mine deleted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.