Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hosting server time not in same time zone.

Status
Not open for further replies.

theevilone

IS-IT--Management
Aug 19, 2001
52
GB
I need to insert the time of a form submitted by a user, into my SQL server DB. My host is in a different time zone to me by 5 hours. I do n't want to use the client time either, as that would introduce lots of other issues.

How can I :-

a)compensate for the 5 hours, bearing in mind that this may also affect the date, depending on when it is submitted.
b)account for daylight saving ?

Any help would be much appreciated.




 
Use the DateAdd() function:

<cfoutput>#DateAdd(&quot;h&quot;, -5, Now())#</cfoutput> - tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top