Randy Johnson - CFConcepts wrote:
> The one linux server Is on Central Time Zone,  The other linux server is 
> on pacific time zone.
> 
> The windows server is on Eastern Time Zone.

you've fallen into timezone hell:

http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entry&entry=77223B6A-20ED-7DEE-2AB7FBB1F37ABD77


this line converts your datetimes to the *local* tz (cf sees all datetimes as 
server tz datetimes):

<cfset theDate=DateAdd("s",i/1000,DateConvert("utc2Local", "January 1 1970 
00:00"))>

so "yup" you can expect different datetimes across different tz as you've 
changed the start date per tz.

if you want the same tz for all your boxes you either have to set them all to 
the same tz or cast the  resulting datetimes to whatever tz you need. best 
recommendation is to set all the server's to UTC & cast the tz as needed, see:

http://www.sustainablegis.com/projects/tz/testTZCFC.cfm

for a CFC that might help.

that said i ran your code on a win2003 box (cf8/JDK 1.6) & got very different 
datetimes after setting it to the tz you indicated above:

Central Standard Time
{ts '2008-09-03 10:00:00'}
{ts '2008-09-10 10:00:00'}
{ts '2008-09-17 10:00:00'}
{ts '2008-09-24 10:00:00'}

Pacific Standard Time
{ts '2008-09-03 06:00:00'}
{ts '2008-09-10 06:00:00'}
{ts '2008-09-17 06:00:00'}
{ts '2008-09-24 06:00:00'}

so maybe you should double check your server's tz--last week or so i helped 
someone who thought they had set their tz to "British Summer Time" (BST) but it 
turned out the JRE thought that BST meant "Bangladesh Standard Time" ;-) this 
snippet should help:

thisTZ=createObject("java","java.util.TimeZone").getDefault();
writeoutput("#thisTZ.getDisplayName()# (#thisTZ.getID()#)");


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311704
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to