Re: now( ) is off by an hour

2013-03-15 Thread daniel kessler

Updating to JVM 1.6 worked great.  Thank you all very much for your assistance. 
 You've been a great help. 

~|
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:355037
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: now( ) is off by an hour

2013-03-13 Thread Cameron Childress

On Tue, Mar 12, 2013 at 9:31 AM, daniel kessler dani...@umd.edu wrote:

 I get:
 JRE:=Java(TM) 2 Runtime Environment, Standard Edition 1.4.2_09-b05


This is your problem.


 I saw that there is an update to 1.4.2_11, but that came out around 2007 I
 think.  So I would need a more recent update.


Yes, this JVM is very very old. It does not have the correct time database
to correct for the DST changes that went into effect way back in
2007(!!). Since DST just shifted in the US this past weekend, you are
probably seeing the problem starting this week (your JVM probably thinks it
doesn't shift for two more weeks). Here is the Adobe KB article addressing
the issue.

http://helpx.adobe.com/coldfusion/kb/coldfusion-mx-jrun-suns-jvm.html

Update your JVM. If it's 6+ years old, this is likely only one of many
problems you will encounter.

-Cameron

-- 
Cameron Childress
--
p:   678.637.5072
im: cameroncf
facebook http://www.facebook.com/cameroncf |
twitterhttp://twitter.com/cameronc |
google+ https://profiles.google.com/u/0/117829379451708140985


~|
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:354966
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


now( ) is off by an hour

2013-03-12 Thread daniel kessler

I am working on an application that does it's own timeout, at 45 minutes.  It 
gets the last logged in time and compares it to the database current time.  The 
database time is correct.  However, the now() time is incorrect by an hour.  I 
assume this is due to daylight savings time.

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?

thank you.

daniel 

~|
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:354932
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: now( ) is off by an hour

2013-03-12 Thread DURETTE, STEVEN J

Check the date and time on the ColdFusion server. Also, make sure that your DB 
server and ColdFusion server are in the same time zone.


-Original Message-
From: daniel kessler [mailto:dani...@umd.edu] 
Sent: Tuesday, March 12, 2013 8:49 AM
To: cf-talk
Subject: now( ) is off by an hour


I am working on an application that does it's own timeout, at 45 minutes.  It 
gets the last logged in time and compares it to the database current time.  The 
database time is correct.  However, the now() time is incorrect by an hour.  I 
assume this is due to daylight savings time.

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?

thank you.

daniel 



~|
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:354933
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: now( ) is off by an hour

2013-03-12 Thread Paul Hastings

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()/360;

writeoutput(JRE:=#JREname# #JREversion#br
tz:=#tzName#brdst 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


Re: now( ) is off by an hour

2013-03-12 Thread daniel kessler

It's a localhost CFServer (developer mode).  That is on a VPN that I am using.  
The VPN has the correct time.  However the now() is incorrect.  It was correct 
until daylight savings time.

At this point, I assume that it's getting the time from the machine that is 
hosting the VPN, which means that the VPN can have a different time.  However 
since I don't know where now() gets it's time, I can't get any traction on this 
from our support staff.

 Check the date and time on the ColdFusion server. Also, make sure that 
 your DB server and ColdFusion server are in the same time zone. 

~|
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:354935
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: now( ) is off by an hour

2013-03-12 Thread Bobby

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions
_m-r_07.html

Gets the current date and time of the computer running the ColdFusion
server

It doesn't get its time form the VPN, it gets its time from the host
machine running the CF service. Clock in the bottom right corner of
windows has the time that the CF server would use.

If, for some reason, you've hidden the clock, cmd.exe  echo %time%

Your windows timezone could be off or you don't have the option set to
adjust for daylight savings time.



On 3/12/13 8:05 AM, daniel kessler dani...@umd.edu wrote:


It's a localhost CFServer (developer mode).  That is on a VPN that I am
using.  The VPN has the correct time.  However the now() is incorrect.
It was correct until daylight savings time.

At this point, I assume that it's getting the time from the machine that
is hosting the VPN, which means that the VPN can have a different time.
However since I don't know where now() gets it's time, I can't get any
traction on this from our support staff.

 Check the date and time on the ColdFusion server. Also, make sure that
 your DB server and ColdFusion server are in the same time zone.



~|
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:354936
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: now( ) is off by an hour

2013-03-12 Thread daniel kessler

Thanks bobby.  I can only see the VPN OS, not the computer that serves up the 
VPN.  It sounds like I should ask them to check that server's time.

thank you.

It doesn't get its time form the VPN, it gets its time from the host
machine running the CF service. Clock in the bottom right corner of
windows has the time that the CF server would use.

If, for some reason, you've hidden the clock, cmd.exe  echo %time%

Your windows timezone could be off or you don't have the option set to
adjust for daylight savings time.

~|
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:354938
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: now( ) is off by an hour

2013-03-12 Thread daniel kessler

I get:
JRE:=Java(TM) 2 Runtime Environment, Standard Edition 1.4.2_09-b05
tz:=Eastern Daylight Time
dst savings:=1
uses DST: YES
in DST now: NO

I saw that there is an update to 1.4.2_11, but that came out around 2007 I 
think.  So I would need a more recent update.  A coworker said that she updated 
her jvm and still sees the error.  However, I'm waiting for her to come in to 
work and run this script that you gave me.  Maybe it gives some different info.

When it says in dst now, that means that JVM thinks it's not in DST or that 
the computer does not think it's in DST?


script
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()/360;

writeoutput(JRE:=#JREname# #JREversion#br
   tz:=#tzName#brdst 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:354939
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: now( ) is off by an hour

2013-03-12 Thread daniel kessler

I've been using the term VPN when I meant VM (virtual machine).  
Sorry about any confusion and thank you all for your help so far.

~|
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:354940
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: now( ) is off by an hour

2013-03-12 Thread Paul Hastings

On 3/12/2013 8:31 PM, daniel kessler wrote:
 JRE:=Java(TM) 2 Runtime Environment, Standard Edition 1.4.2_09-b05

kind of old  problematic.

 When it says in dst now, that means that JVM thinks it's not in DST or that
 the computer does not think it's in DST?

the JVM that cf's using thinks that it's not in DST. in theory the OS  JVM 
should use the same timezone, but that's in theory.

welcome to timezone hell.


~|
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:354946
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: now( ) is off by an hour

2013-03-12 Thread Carl Von Stetten

Daniel,

What version of ColdFusion are you running?  Maybe you can upgrade the 
JVM to a newer version that has updated DST settings?  I think the 
start/end dates for DST in the US were changed in 2007, while Java 1.4 
hasn't been current since around 2004.

-Carl V.

On 3/12/2013 6:31 AM, daniel kessler wrote:
 I get:
 JRE:=Java(TM) 2 Runtime Environment, Standard Edition 1.4.2_09-b05
 tz:=Eastern Daylight Time
 dst savings:=1
 uses DST: YES
 in DST now: NO

 I saw that there is an update to 1.4.2_11, but that came out around 2007 I 
 think.  So I would need a more recent update.  A coworker said that she 
 updated her jvm and still sees the error.  However, I'm waiting for her to 
 come in to work and run this script that you gave me.  Maybe it gives some 
 different info.

 When it says in dst now, that means that JVM thinks it's not in DST or that 
 the computer does not think it's in DST?


 script
 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()/360;

 writeoutput(JRE:=#JREname# #JREversion#br
  tz:=#tzName#brdst 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:354952
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: now( ) is off by an hour

2013-03-12 Thread Wil Genovese

Here is your answer: This JVM version is SO old that it has the OLD DST change 
over date.  The DST change over dates changed in 2008.

See this tech note from (Sun) Oracle. 

http://www.oracle.com/technetwork/java/javase/releasenotes-138306.html#142_19

Regards,
Wil


Wil Genovese
Sr. Web Application Developer/
Systems Administrator
CF Webtools
www.cfwebtools.com

wilg...@trunkful.com
www.trunkful.com

On Mar 12, 2013, at 5:36 PM, Carl Von Stetten vonner.li...@vonner.net wrote:

 
 Daniel,
 
 What version of ColdFusion are you running?  Maybe you can upgrade the 
 JVM to a newer version that has updated DST settings?  I think the 
 start/end dates for DST in the US were changed in 2007, while Java 1.4 
 hasn't been current since around 2004.
 
 -Carl V.
 
 On 3/12/2013 6:31 AM, daniel kessler wrote:
 I get:
 JRE:=Java(TM) 2 Runtime Environment, Standard Edition 1.4.2_09-b05
 tz:=Eastern Daylight Time
 dst savings:=1
 uses DST: YES
 in DST now: NO
 
 I saw that there is an update to 1.4.2_11, but that came out around 2007 I 
 think.  So I would need a more recent update.  A coworker said that she 
 updated her jvm and still sees the error.  However, I'm waiting for her to 
 come in to work and run this script that you gave me.  Maybe it gives some 
 different info.
 
 When it says in dst now, that means that JVM thinks it's not in DST or 
 that the computer does not think it's in DST?
 
 
 script
 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()/360;
 
 writeoutput(JRE:=#JREname# #JREversion#br
 tz:=#tzName#brdst 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:354953
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm