Adobe Dreamweaver Forums



Last 10 THreads :         Whats the difference between arrayCollection = null andarrayCollection.removeAll()? (Last Post : atta707 - Replies : 1 - Views : 2 )           »          Unable to create SWC in Flash CS4 (Last Post : ChickenSupreme - Replies : 3 - Views : 8 )           »          Change html page image by the month (Last Post : malcster2 - Replies : 8 - Views : 9 )           »          HELP ON INSETR RECORD php page (Last Post : DerRoteBaron - Replies : 0 - Views : 1 )           »          URLRequest behavior (Last Post : Andrei1 - Replies : 3 - Views : 6 )           »          Trouble with SQL Query Tool on Leopard (Last Post : pdenlinger - Replies : 0 - Views : 1 )           »          Adding database RDS Login Dreamweaver 8 Coldfusion 8 (Last Post : ClubbyJMC2008 - Replies : 2 - Views : 3 )           »          Can't install Fireowrks Extension in CS4 (Last Post : ssailer - Replies : 3 - Views : 27 )           »          Fireworks CS3 or CS4 and Vista 64 bit O.S. (Last Post : ssailer - Replies : 0 - Views : 1 )           »          Newbie- Help with Flash dynamic pop up box (Last Post : Gipoh - Replies : 1 - Views : 2 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Cold Fusion
 
Tags:



Reply
  #1 (permalink)  
Old 10-01-2008, 04:00 AM
Rufhausen
 
Posts: n/a
Diggs:
Default Override now() to "fake" system time?

I've inherited an application that uses the now() function throughout to
present the current time for use in queries, calculations, etc.
I don't have access to change the system time, so is there a way to override
the output of the now() function instead of having to replace every instance of
it with a variable?
Thanks.



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-01-2008, 04:00 AM
Dan Bracuk
 
Posts: n/a
Diggs:
Default Re: Override now() to "fake" system time?

I don't know if it will work, but you could write a udf called now() and cfinclude it somehow in your application.cfm/cfc file.
Reply With Quote
  #3 (permalink)  
Old 10-01-2008, 04:00 AM
Dan Bracuk
 
Posts: n/a
Diggs:
Default Re: Override now() to "fake" system time?

I don't know if it will work, but you could write a udf called now() and cfinclude it somehow in your application.cfm/cfc file.
Reply With Quote


  #4 (permalink)  
Old 10-01-2008, 04:00 AM
Rufhausen
 
Posts: n/a
Diggs:
Default Re: Override now() to "fake" system time?

I'm afraid I get this if I try that:
"The names of user defined functions cannot be the same as built-in ColdFusion functions."
Reply With Quote
  #5 (permalink)  
Old 10-01-2008, 04:00 AM
Rufhausen
 
Posts: n/a
Diggs:
Default Re: Override now() to "fake" system time?

I'm afraid I get this if I try that:
"The names of user defined functions cannot be the same as built-in ColdFusion functions."
Reply With Quote
  #6 (permalink)  
Old 10-01-2008, 04:00 AM
MaryJo
 
Posts: n/a
Diggs:
Default Re: Override now() to "fake" system time?

Yeah,offhand I can't think of an easy way to do this without replacing the
function with one of your own.

As an interesting side note...this is something the Railo cfml engine allows,
to set the system time zone on a per-application basis. So hopefully this will
makes its way into ColdFusion as well eventually.



Reply With Quote


  #7 (permalink)  
Old 10-01-2008, 04:00 AM
MaryJo
 
Posts: n/a
Diggs:
Default Re: Override now() to "fake" system time?

Yeah,offhand I can't think of an easy way to do this without replacing the
function with one of your own.

As an interesting side note...this is something the Railo cfml engine allows,
to set the system time zone on a per-application basis. So hopefully this will
makes its way into ColdFusion as well eventually.



Reply With Quote
  #8 (permalink)  
Old 10-01-2008, 04:00 AM
-==cfSearching==-
 
Posts: n/a
Diggs:
Default Re: Override now() to "fake" system time?

MaryJo wrote:
> As an interesting side note...this is something the Railo cfml
> engine allows, to set the system time zone on a per-application basis.
> So hopefully this will makes its way into ColdFusion as well eventually.


Neat feature. That is good to know.

Yes, I agree. I think the best you can do is to define your own function in
your application.cfc. Give it a similar name like "cfTimeNow()". Then do a
global replace in your code.

Reply With Quote
  #9 (permalink)  
Old 10-01-2008, 04:00 AM
-==cfSearching==-
 
Posts: n/a
Diggs:
Default Re: Override now() to "fake" system time?

MaryJo wrote:
> As an interesting side note...this is something the Railo cfml
> engine allows, to set the system time zone on a per-application basis.
> So hopefully this will makes its way into ColdFusion as well eventually.


Neat feature. That is good to know.

Yes, I agree. I think the best you can do is to define your own function in
your application.cfc. Give it a similar name like "cfTimeNow()". Then do a
global replace in your code.

Reply With Quote


Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:46 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk