On 3/12/2013 7:48 PM, daniel kessler wrote:
> So where does now() get it's time? I'm on a VPN and that has the correct
> time when I check it's clock. Would it then be the server that hosts the
> VPN? Or someplace else?
time could be fine but maybe JRE that cf is using is running in a different
timezone. you can check via this snippet:
<cfscript>
jre=createObject("java","java.lang.System");
JREname=jre.getProperty("java.runtime.name");
JREversion=jre.getProperty("java.runtime.version");
tz=createObject("java","java.util.TimeZone").getDefault();
tzName=tz.getDisplayName(true,tz.LONG);
dstSavings=tz.getDSTSavings()/3600000;
writeoutput("JRE:=#JREname# #JREversion#<br>
tz:=#tzName#<br>dst savings:=#dstSavings#<br>
uses DST: #tz.useDaylightTime()#<br>
in DST now: #tz.inDaylightTime(now())#");
</cfscript>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354934
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm