> Hello CF Community-
>
> I was wondering if there was an easy way to get or calculate a local
> client's computer time. I am working on an application that needs to
> sum hours by the difference of a start time and end time. If the end
> time is null, I need to somehow get the local facilities time to
> calculate the difference. Any help would be much appreciated. Thanks
> in advance.
You could do something like this:
My server is in Delaware and I live in Hawaii. So if you want to calculate the
time difference between 2 place(the server,and somebody in hawaii) this is one
way. I found other examples in the CF docs.
>Right now the time is:<br>
<cfset servertime = Now()>
<cfset time = Now()>
<cfset time = dateadd("h",-6,time) />
<cfoutput>The server's time, which is in Delaware is
#TimeFormat(servertime,'h:mm tt')#</cfoutput><br />
<cfoutput>The time in Hawaii is #TimeFormat(time,'h:mm tt')#</cfoutput>
you can see this here:
http://gotnutrients.net/local_time.cfm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4721
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15