CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Modify timestamp value by two hours

Print topic Send  topic

Author Message
Niven

Posts: 8
Posted: 09/20/2007, 8:52 PM

Hi Folks,

I have no trouble displaying the correct timestamp for when a record was Last Modified but the problem is the webserver is two hours different from the users, so the the time displayed is two hours off. I'd like to correct this.

How can I modify this --not by adjusting the CURRENT_TIMESTAMP on update-- but rather modifying it before displaying it to screen.

My timestamps look like this: 2007-09-19 18:04:07

Any/all suggestions most appreciated. Thanks!

Lurch

View profile  Send private message
vikrant


Posts: 32
Posted: 09/21/2007, 12:08 AM

Hi Lurch,
you modify date at before show event of date using following code:

$New_Date = strtotime($OLD_Date);
$PlusTwoHours = (60*60*2); // 60 sec * 60 min * 2 Hrs //
$New_Date = $OLD_Date + $PlusTwoHours;
//--If require---
$New_Date = CCFormatDate($New_Date,array("dd","/","mm","/","yyyy"));
$FormName->DateControlName->Value = $New_Date;
_________________
Vikrant
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.