Well i do something similar in a way.    I never use now() in any of my
code.  Instead in the application.cfc i create a variable called
request.austime  (for Australian Time) and throughout my code whenever i
need a time stamp or a date or i might otherwise use now(), i use
request.austime instead.

Then,  depending on the environment,  in Application.cfc I create
request.austime in different ways but it has no effect on the rest of the
code.    In my development machine, I use  <cfset request.austime = now() />
because the system clock is set to my local time zone.   On my production
machine, which is set to UTC, i use the timezone.cfc to convert UTC to
Sydney time (or for clients who want their sites to appear based in other
timezones I'll use the same cfc to set the variable request.austime to that
time zone.)

In other words, that whole timezone/daylight savings thing is handled in
one, maybe two lines of code in application.cfc and the rest of the
application doesnt need to know or care what timezone the server is sitting
in.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month



On Fri, Jul 30, 2010 at 12:57 PM, Paul Hastings <[email protected]>wrote:

>
> On 7/30/2010 2:09 AM, Charlie Griefer wrote:
> > funds for VPS, unfortunately) on a server with the clock set to PST.
>
> ah just think how simpler our world would be w/a setTimezone() function ;-)
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335882
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to