SunQuest
           ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 12th, 2005, 01:00 PM
jdh0f0 jdh0f0 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 80 jdh0f0 User rank is Private First Class (20 - 50 Reputation Level)jdh0f0 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 54 sec
Reputation Power: 4
Adjusting time display from server time to local time

How can I change the time display on a website from my server's time (Mountain) to my local time (Eastern)? I tried:

#TimeFormat(now()+2,'h:mm tt')#

but it doesn't work, although I was able to change the date displayed using the same logic.

Thanks,
Jason

Reply With Quote
  #2  
Old March 12th, 2005, 03:56 PM
mortisRider mortisRider is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 21 mortisRider User rank is Private First Class (20 - 50 Reputation Level)mortisRider User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 25 m 51 sec
Reputation Power: 0
Try something like:

<cfset currentTime = Hour(now()) + 2>

This will increment the hour of the current time by 2 (or whatever you want)

Reply With Quote
  #3  
Old March 13th, 2005, 03:42 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
This is the right approach.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Adjusting time display from server time to local time


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway