Coldfusion bug?

I have the folllowing code:
<cfparam name="PageNum_EducationForumRS" default="1">
<cfquery name="CountOfResponses" datasource="Education
Forum">
SELECT ParentID, Count(ParentID) as CountOfResponses
FROM Messages
GROUP BY PARENTID
WHERE ParentID="#Session.ReplyRecordID#"
</cfquery>
This generates the following error:
[Macromedia][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error
(missing operator) in query expression 'PARENTID WHERE
ParentID=[3]'.
The Error Occurred in C:\CFusionMX\wwwroot\Education\Bulletin
Board\Education - Bulletin Board - Replies Table of Contents.cfm:
line 7
5 : GROUP BY PARENTID
6 : WHERE ParentID="#Session.ReplyRecordID#"
7 : </cfquery>
8 : <cfquery name="MessagesRespondingToThisID"
datasource="Education Forum">
9 : SELECT Messages.ID, Messages.ParentID, Messages.Subject,
Messages.Author, Messages.Message, Messages.Email, Messages.Posted
SQL SELECT ParentID, Count(ParentID) as CountOfResponses FROM
Messages GROUP BY PARENTID WHERE ParentID="3"
DATASOURCE Education Forum
VENDORERRORCODE -3100
SQLSTATE 42000
I've defined Session.ReplyRecordID as a session variable in
my application.cfm file. I've also outputed this variable in other
Coldfusion pages, so there is no problem with the variable. I've
also replaced the Session.ReplyRecordID with the number 3 and I
still get the same error message.
I've checked the database and ParentID is defined as a
numerical field.
I've tried taking away the hashes. I've enclosed the whole
string in signle and double quotes e.g. "#Session.ReplyRecordID#"..
I've added <cfparam name="Session..Reply.RecordID"
default="1"> to the code. All to no avail. I've searched the
internet for help, but came across no solutions.:
Please help before I go mad!
Surely there is a simple solution.
Thanks in advance.

Thanks a million and a million more. I knew it would be
something simple!
Thanks again

Similar Messages

  • Where's the old coldfusion bug tracker?

    I am looking for the details of the bugs 51067 and 45138 which were mentioned in http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt23.htm but I can't seem to find them.
    http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html does not seem to have those bugs as well.
    Where can I find them?
    Thanks

    I am looking for the details of the bugs 51067 and 45138 which were mentioned in http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt23.htm but I can't seem to find them.
    http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html does not seem to have those bugs as well.
    Where can I find them?
    Thanks

  • CF8 bug - cfswitch/cfcase

    I've come across a coldfusion bug with some existing code
    after upgrading to coldfusion 8. I have 5 pages each with a set of
    cfcase's inside a cfswitch. Right after upgrading to cf 8 they all
    gave me the following error: Context validation error for the
    cfcase tag.
    The cfswitch tag has a duplicate cfcase tag for value {ts
    '1900-01-04 00:00:00'}.
    ColdFusion cannot determine the line of the template that
    caused this error. This is often caused by an error in the
    exception handling subsystem.
    I started troubleshooting by commenting out certain cfcase
    statements and found that in every case it was caused by a cfcase
    that had a value of "5f" or "3f" or "22f" - always the one with "f"
    in it. All I have to do to fix it and get my pages running again is
    change that cfcase value to "5g" or basically anything other than
    "f". Its really annoying because I have to run back through all my
    code and change the mode variables which are passing the "f" values
    around, but I was wondering if anyone had any clue how to fix this?
    Thanks,
    Davey

    This works fine here:
    <cfparam name="URL.test" default="1" type="any">
    <cfswitch expression="#URL.test#">
    <cfcase value="1">
    <p>it was one</p>
    </cfcase>
    <cfcase value="2">
    <p>it was two</p>
    </cfcase>
    <cfcase value="3f">
    <p>it was 3f</p>
    </cfcase>
    </cfswitch>
    <p><a
    href="test.cfm?test=1">One</a></p>
    <p><a
    href="test.cfm?test=2">Two</a></p>
    <p><a href="test.cfm?test=3f">Three
    F</a></p>
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com
    "Dstharding" <[email protected]> wrote in
    message
    news:fnfv5s$p3o$[email protected]..
    > I've come across a coldfusion bug with some existing
    code after upgrading
    > to
    > coldfusion 8. I have 5 pages each with a set of cfcase's
    inside a
    > cfswitch.
    > Right after upgrading to cf 8 they all gave me the
    following error:
    > Context
    > validation error for the cfcase tag.
    > The cfswitch tag has a duplicate cfcase tag for value
    {ts '1900-01-04
    > 00:00:00'}.
    >
    > ColdFusion cannot determine the line of the template
    that caused this
    > error.
    > This is often caused by an error in the exception
    handling subsystem.
    >
    > I started troubleshooting by commenting out certain
    cfcase statements and
    > found that in every case it was caused by a cfcase that
    had a value of
    > "5f" or
    > "3f" or "22f" - always the one with "f" in it. All I
    have to do to fix it
    > and
    > get my pages running again is change that cfcase value
    to "5g" or
    > basically
    > anything other than "f". Its really annoying because I
    have to run back
    > through
    > all my code and change the mode variables which are
    passing the "f" values
    > around, but I was wondering if anyone had any clue how
    to fix this?
    >
    > Thanks,
    > Davey
    >

  • Calling mysql stored procedure having insert sql commands within cftransaction is not getting rolled back

    Hi,
    cftransaction is working perfectly when all the insert
    updates are called by cfqquery.
    But when there is a mysql stored procedure call with in
    cftrnsaction and that mysql stored procedure is having many inserts
    and updates, cftransaction is not able to roll back insert/updates
    happened in stored procedure.
    I am using InnoDB tables/database of mysql.
    Did anybody faced a similar problem and is it a coldfusion
    bug or mysql bug.
    We checked with Java and java is able to roll back the
    transaction, but coldfusion cftransaction is failing.
    Please help.
    Regards,
    Saikumar

    Mark,
    I believe the syntax of your formatted search is not right. I guess you are trying to get the U_Width from Item Master and the other values from the current form.
    SELECT @Width = T0.U_WTH FROM [dbo].[OITM] T0.WHERE T0.ItemCode = $[$38.1.0]
    EXEC TBC_CHOP @Width, $[$38.U_LINETYPE.0], $[$38.U_LI.0], $[$38.U_LN.0],
    $[$38.U_LD.0], $[$38.U_HI.0], $[$38.U_HN.0], $[$38.U_HD.0], $[$38.U_QTYORD.Number]
    If you see I have added a third parameter which is the Type to the formatted seach field selection $[$Item.Column.Type]
    I have made then all 0 but you may change it as per the col type.  This Type should be 0 for Char type columns, Number for numeric columns and Date for Date type cols
    Suda

  • Errors with CF 8.0.1 hotfix 3 and hotfix 4, "Object Instantiation Exception.Class not found"

    We need to get our servers up to date with the latest ColdFusion hotfixes in order to pass our security scans and policies. We have been following the Adobe instructions for installing the hotfixes, but we’re getting the same errors each time. The CF 8 hotfix 2 works fine, but once we install hotfix 3 and/or hotfix 4, we get the following errors:
    "Object Instantiation Exception.Class not found: coldfusion.security.ESAPIUtils The specific sequence of files included or processed is: C:\ColdFusion\wwwroot\WEB-INF\exception\java\lang\Exception.cfm, line: 12 "
    coldfusion.runtime.java.JavaObjectClassNotFoundException:
    We have dozens of servers running Windows XP, Netscape Enterprise Server 6.1 (I  know, don’t laugh), ColdFusion 8,0,1,195765, and Java Version 1.6.0_04. Just about  the only good thing about running XP on our servers is that it matches  our development boxes, so we have almost mirrored environments for dev,  test, and production. We do NOT have the CF install with the J2EE configuration.
    The crazy thing is, on tech note 51180 (http://kb2.adobe.com/cps/511/cpsid_51180.html), it says that the fix for bug # 71787 (Fix for "Object Instantiation Exception" thrown when calling a Java object constructor or method with a null argument under JDK 1.6.) was added in cumulative hotfix 2. However we don’t see this problem until we go to hotfix 3 (or 4).
    I’ve also been reading that other people had this same problem, and that the CF 8 hotfix 3 was not compatible with certain versions of JDK, then when you read the Adobe site for CF 8.0.1 hotfix 3, it says “Added the updated cumulative hotfix to make it compatible with jdk 1.4.x, 1.5.x and 1.6.x.”, so that makes me think that Adobe was supposed to have fixed this CF 8.0.1 hotfix 3 JDK incompatability issue - but unfortunately it's still not working for us. We have followed the instructions for removing the jar files and starting/restarting the CF server as directed, we’ve tried this 5-6 times, and still no luck.
    Recommendations? Seems like this is a ColdFusion bug to me – one that says is fixed on the Adobe site, but is not fixed in our environment. Please advise, thanks.

    For what it's worth, we had an MXUnit user describe a similar, though not identical, problem after installing the latest hotfixes. In his case, he's getting "NoSuchMethodExceptions".

  • Cfthread Error, Cannot Find File "taglib.cftId"

    I am using several threads within a ColdFusion request to create PDF files.  When I run the code on my ColdFusion developers edition environment, it works just fine.  However, when I attempt to run it on another environment, I always get the same error:
    An error occurred when performing a file operation read on file MYAPPDIRECTORY\WebRoot\WEB-INF\cftags\META-INF\taglib.cftld. The cause of this exception was: java.io.FileNotFoundException: MYAPPDIRECTORY\WebRoot\WEB-INF\cftags\META-INF\taglib.cftld (The system cannot find the path specified).
    The issue is of course that ColdFusion is looking in the incorrect directory.  I researched the issue and found the mention of a ColdFusion bug, but I am curious if anybody else has run into a similar issue and if they found a workaround/solution.

    This bug does not seem to be fixed, but Zack1590's workaround will solve the problem. 
    The issue is that getSupportedTagAttributes cannot find the correct path for /WEB-INF as getRealPath does not work inside the cfthread. Luckily the results of getSupportedTagAttributes are cached in server memory. This means that if the tags are called from outside a cfthread first they will then work fine inside the cfthread. By making sure all the custom tags are called before entering the cfthread Zack1590 is able to avoid this error.
    More info: http://www.danielgaspar.com/blog/2012/12/taglib-cftld-the-system-cannot-find-the-path-spec ified/

  • Error when trying to register VMM as Virtual Machine Cloud provider

    Hello, I have some unusual problem with registering VMM server 2012 SP1 in WAP.
    The error is in WAP application log Windows Azure Log\Mgmt-SVC-AdminAPI:
    ''...An error occurred while processing this request.</message><innererror><message>Execution of command Get-SCSPFStamp2 failed. Cause of the problem: An error was encountered while trying to get one or more Stamps. ErrorCode=CmdletGeneralError
    Operation=CmdletReadingStamp</message><type>Microsoft.Management.Odata.CommandInvocationFailedException....."
    VMM is not recorded in the SQL database MmgmtSvcStore, table mpResourseProviders as registered server.
    Any suggestions?

    Hi,
    This issue has been logged as a bug in ColdFusion bug tracker with a bug id #84949
    Cast your vote here!. http://cfbugs.adobe.com/
    HTH

  • Too few parameters. Expected 1.

    Im getting "Too few parameters. Expected 1." when trying to
    update a form, and I need a second pair of eyes if anyone can help?

    I found where the problem was located at, its the time and
    date column. I guess you could say its a ColdFusion bug. according
    to Adobe:
    quote:
    This is a known issue and Macromedia's Engineers are aware of
    it. Currently, the only known work around available is to avoid
    inserting and/or updating columns of "Date/Time" data types in
    Access with empty strings, ("") or with any other value that does
    not correspond to the range of values specified for the data type.
    when I took out "distribution_date='#FORM.dateOfdist#' which
    had a data type of Date/Time in Access it worked.
    more information about this topic
    can be found here
    Thanks

  • CFSELECT annoying error :/

    Before the update I received this error and used the following to correct it...... but this fix no longer works with the recent update to CS6 Dreamweaver. The error pops up 3x each time I click in to Dreamweaver and it is driving me crazy. How do I disable? I'm ok with the code inspection, has saved me a lot, but this is ridiculous.
    Link: http://s14.postimage.org/hqs903cap/Error.jpg
    Old Fix:
    c:\program files\adobe\dreamweaver CS5\configurations\inspectors\cf_select.js
    Went to line 231  canInspectSelection() function.  Changed it to return (false);  instead of true.
    Something to do with the property inspectors.

    Known issue, reported as bug 82852 in ColdFusion bug database

  • Adobe ColdFusion Builder Bugbase: Vote for Some of these Bugs to be Fixed

    As I'm sure you know CF Builder 3 isn't quite perfect yet and the Adobe Bugbase has a not-so-great search interface so I thought I would share some issues I reported recently which have impacted my workflow with the product.  Perhaps some of my fellow developers have also run into these annoyances.  If you have, or if you feel like supporting these issues to get Adobe's developers to fix them, I encourage you to also leave a note on each bug to increase the likelihood that they get fixed in the next release.  Feel free to also post links to bugs/feature requests you've submitted and perhaps the community will also support your bug reports as well.
    Below please find the name and link to each bug/feature request. To vote for the bug please click the "my vote" button at the bottom right corner of the page.
    Bug 1:Code Coloring Breaks When Comments Used Within Function with Named Arguments
    Bug#3831825 - Code Coloring Breaks When Comments Used Within Function with Named Arguments
    Bug 2: ColdFusion Builder 3.0 Hangs When Using Code Assist on Large Files
    Bug#3833130 - ColdFusion Builder 3.0 Hangs When Using Code Assist on Large Files 
    Note: Adobe has asked for code samples on this one. If you have a large CFM or CFC file that hangs when trying to provide suggestions please upload your file to the bug report.
    Feature Request 1: Code Suggest Enhancement: Ability to disable code suggest for variables / tags independantly
    https://bugbase.adobe.com/index.cfm?event=selectBug&CFGRIDKEY=3854326
    Note: This one is related to the above bug (bug #2). I believe that if we can turn on/off specific types of suggestions we can improve the performance when using code assist. This one will need a lot of votes since it's a feature request.
    Bug 3: ColdFusion Builder Ignores CFELSEIF/CFELSE Tags in Outline
    https://bugbase.adobe.com/index.cfm?event=selectBug&CFGRIDKEY=3865754

    Thanks Carl.  I haven't tried Twitter yet as I don't really have any followers that are fellow developers.  I've been looking for other people with relevant problems though on forums (this one, stackoverflow, etc...) and when I encounter them I pass along my bugbase submissions.

  • BUG: ColdFusion does not handle conflicting cookies correctly

    (I have reported this as a bug - I'm posting it here to hopefully save people from having to go through the same process)
    If I've got a CF instance on test1.k9.edu, and my cookie jar has CFID/CFToken cookies for both 'test1.k9.edu' and '.k9.edu', CF behaves badly in two ways:
    1) A CFDump of COOKIE shows two entries for each of the CFID and CFToken cookies
    2) the values are identical, and match the first one set - NOT the most specific - 'test1.k9.edu' should always take precedence, but the CF behavior is that it only takes precedence if the browser got it before the '.k9.edu' value (browser in this case is FireFox 20.0.1)
    The net result is... that if I browse to foo.k9.edu and it sets CFID/CFToken cookies at the domain level... and then go to 'test1.k9.edu' which does not set domain cookies... I will not be able to maintain a session (assuming that 'test1' has the latest security fixes) at test1.k9.edu until I scrub my cookies - each request will take the '.k9.edu' values, reject them because they didn't originate locally... and issue new cookies (which will be ignored by the next request... and so on)
    This problem is not limited to CFID/CFToken cookies, although this is where the problem is most urgent, as it could be exploited to create a domain-wide denial of service (by effectively blocking session use for all CF instances in the domain)
    The test case is very simple  (change the domain in this example as appropriate for your installation)
    [for this example, all requests go to test1.k9.edu - adjust to match your domain]
    first request - run this:
    <cfcookie name="test1a" value="domain(domain cookie sent first first)" domain=".k9.edu">
    <cfcookie name="test1b" value="no-domain(non-domain cookie sent first)">
    second request - run this:
    <cfcookie name="test1a" value="no-domain(domain cookie sent first first)">
    <cfcookie name="test1b" value="domain(non-domain cookie sent first)" domain=".k9.edu">
    third request - run this:
    <cfdump var=#cookie#>
    ===============
    My tests were all done with FireFox 20.0.1 with ColdFusion 10 (stand-alone), updater 10 applied.  My web server is Apache 2.2.  The same problem is seen with CF9.0.2.
    The same tests run with Railo 3.3.4 (Tomcat 7) produced correct results (value seen in CFDump results is reliably from the most-specific cookie)

    I feel your pain, more so as you are trying to assist in making a product better. I would fire off an email to the top dog, Steve Jobs. As well, Apple should make a habit of trolling the forums here as they are where the real work of fixing and educating Apple customers takes place. I am amazed by the assistance I have had here and try to assist where I can while avoiding anything to make matters worse. Those Top Users just to my right deserve praise and an Apple goodie every now and then. There ought to be a hall of fame too.
    < Edited by Host >

  • Coldfusion 8 /Apache Connector Bug??????

    I have wasted almost 3 weeks now on this problem. It will
    cost us $500 to get a answer if this is a bug on Coldfusion 8.
    Almost ready to jump this ship and go to the Open source camp!
    Install went fine.
    Running Red Hat 4AES
    Apache 2.0
    ColdFusion 8
    I rebuilt the connector about 10 times now....using
    the following document
    http://kb.adobe.com/selfservice/viewContent.do?externalId=121a0b29&sliceId=2
    when I try to start Coldfusion I get the following error....
    The ColdFusion 8 server is starting up and will be available
    shortly.
    ======================================================================
    Running the ColdFusion 8 connector wizard
    ======================================================================
    Configuring the web server connector (Launched on the first
    run of the ColdFusion 8 start script)
    Running apache connector wizard...
    =======================================
    There was an error while running the connector wizard
    Connector installation was not successful
    =======================================
    ======================================================================
    ColdFusion 8 has been started.
    ColdFusion 8 will write logs to
    /usr/coldfusion8/logs/cfserver.log

    Could use similar assistance with our CF8 Standard upgrade.
    I have spent a week trying to upgrade our dedicated server
    from CFMX7 to CF8 with no success. I submitted an Adobe support
    request ticket (Case #0180044098) about five days ago, but am still
    waiting for them to help me resolve the problem. Thought I would
    post this in case someone can offer assistance while I am waiting
    for the Adobe school solution.
    Our server configuration is as follows:
    -- LINUX version: REDHAT Enterprise 4 i686 on standard - WHM
    X v3.1.0
    -- Apache version: 2.0.63
    -- MySQL version: 5.0.45-community
    -- PHP version: 5.2.5
    -- WebHost Manager: version 11.15.0
    -- cPanel Version: 11.18.1-RELEASE, cPanel Build: 20683
    Here is what I have done most recently:
    (1) Uninstalled CF8 (for about the fourth time).
    (2) Deleted /opt/coldfusionmx7 and /opt/coldfusion8
    directories.
    (3) Restarted Apache, ensured the httpd-devel version of
    Apache was installed.
    (4) Reinstalled CF8 (for about the 5th time); it is running
    and appears to have installed successfully (except for Apache
    connectors).
    (5) Modified
    /opt/coldfusion8/bin/connectors/apache_connector.sh as follows:
    ../../runtime/bin/wsconfig \
    -server coldfusion \
    -ws apache \
    -dir /etc/httpd/conf \
    -bin /usr/local/apache/bin/httpd \
    -script /usr/local/apache/bin/apachectl \
    -coldfusion
    (6) Ran ./wsconfig -uninstall to remove old/incorrect
    connectors.
    (7) Ran ./wsconfig per the information below which indicated
    that JRun Apache connector install was successful.
    Here are the results of running the ./wsconfig ...
    [root@_______ bin]# ./wsconfig -uninstall
    [Wed Mar 05 01:15:06 2008] [warn] NameVirtualHost *:80 has no
    VirtualHosts
    Restarted Apache server
    The Apache connector was removed from /etc/httpd/conf
    [root@_______ bin]# ./wsconfig -server coldfusion -ws Apache
    -dir /etc/httpd/conf -bin /usr/local/apache/bin/httpd -script
    /usr/local/apache/bin/apachectl -coldfusion -v
    Found JRun server coldfusion at 127.0.0.1:2930
    Red Hat Enterprise Linux ES release 4 (Nahant Update 6)
    Using Apache binary /usr/local/apache/bin/httpd
    Using resource gcc3/mod_jrun20.so.20020903
    Server version: Apache/2.0.63
    Using Apache control script /usr/local/apache/bin/apachectl
    Parsing Apache configuration file /etc/httpd/conf/httpd.conf
    Exec'ing chmod 777 /opt/coldfusion8/runtime/lib/wsconfig/1
    Set permission to 777 on
    /opt/coldfusion8/runtime/lib/wsconfig/1
    Red Hat Enterprise Linux ES release 4 (Nahant Update 6)
    Using resource gcc3/mod_jrun20.so.20020903
    Server version: Apache/2.0.63
    Exec'ing chmod +x
    /opt/coldfusion8/runtime/lib/wsconfig/1/mod_jrun20.so
    Set permission to execute on
    /opt/coldfusion8/runtime/lib/wsconfig/1/mod_jrun20.so
    Created file
    /opt/coldfusion8/runtime/lib/wsconfig/1/mod_jrun20.so
    Red Hat Enterprise Linux ES release 4 (Nahant Update 6)
    Using resource gcc3/mod_jrun20.so.20020903
    Server version: Apache/2.0.63
    Red Hat Enterprise Linux ES release 4 (Nahant Update 6)
    Using resource gcc3/mod_jrun20.so.20020903
    Server version: Apache/2.0.63
    Wrote file /etc/httpd/conf/httpd.conf
    Added JRun configuration to Apache configuration file
    /etc/httpd/conf/httpd.conf
    Created file
    /opt/coldfusion8/runtime/lib/wsconfig/1/README.txt
    Wrote file
    /opt/coldfusion8/runtime/lib/wsconfig/wsconfig.properties
    Exec'ing /usr/local/apache/bin/apachectl restart
    [Wed Mar 05 01:21:18 2008] [warn] NameVirtualHost *:80 has no
    VirtualHosts
    Restarted Apache server
    The Apache connector was installed to /etc/httpd/conf
    [root@_______ bin]#
    Although everything appears to have installed correctly, our
    server and website will still not recognize or process .cfm files.
    So I am still unable to even access CF8 Administrator and our site
    will not process Coldfusion files, just asks me, "Do you want to
    save this file, or find a program online to open it?"
    Never had any problems with CFMX7 install or operation, so
    this is most disconcerting.
    I am not a happy camper.
    Any suggestions while I am waiting for my Adobe customer
    support ticket to be answered will be most appreciated.
    Thanks.

  • CFZIP Bug in Coldfusion 11

    CFZIP Bug in Coldfusion 11:
    <cfzip action="unzip" ... storepath="no"> does not work as expected. The files are unzipped to the entry path and not to the root level.
    My code worked fine with Coldfusion 9, but not with Coldfusion 11.
    Best regards
    Jürgen

    Looks like you filed a bug report for this.  Thank you!
    -Carl V.

  • Coldfusion Data/Services INT bug?

    Hi, I'm have some troubles with data types in FLASH Builder 4 beta build 235740
    =========================================
    My coldfusion component takes a primary key called "id" of type int
    <!--- FLEX Vars To CFC --->
    <cfargument name="id" required="yes" type="int"/>
    =========================================
    I've imported the service yet the Data/Services tab shows the function as....
    UserManager
        Data Types
        DisplayUser( id : Object ) : Object
    =========================================
    Which I would expect....
    UserManager
        Data Types
        DisplayUser( id : Int ) : Object
    =========================================
    IF I change my data type in my coldfusion component to be string
    <!--- FLEX Vars To CFC --->
    <cfargument name="id" required="yes" type="string"/>
    =========================================
    save and refresh my Data/Services Tab I get the following
    UserManager
        Data Types
        DisplayUser( id : String ) : Object
    =========================================
    I notice that the String data type was updated in the FB Data/Service tab
    but when the component uses an 'int' FB Data/Services treats it as an object
    What am I missing here? - OR - Is this a beta bug?

    I am not sure if there is a type called "int" in ColdFusion. However you can try setting it as "numeric", which should work.
    Thanks,
    - Gaurav

  • ColdFusion Timezone Bug?

    I'm working with values of time in seconds and I've come across an odd bug and I'm hoping someone might explain if this is a bug or if this is some kind of timezone issue. I have code which calculates the difference, in seconds, between two fixed dates. ColdFusion gives me one answer, native Java methods give me a different answer. The difference is one hour which makes me think this is somehow related to timezone, but I can't figure out how to properly correct for this.
    Any insight would be greatly appreciated.
    Here's my sample code:
    <cfset variables.TimeZone = CreateObject( "java", "java.util.TimeZone" ) />
    <cfset variables.Calendar = CreateObject( "java", "java.util.Calendar" ).getInstance( variables.TimeZone.getTimeZone( "GMT" )) />
    <cfset variables.Calendar.set( 2010, 6, 20, 15, 40, 0 ) />
    <h1>Seconds from 01/01/1970 12:00 AM to 07/20/2010 3:40 PM</h1>
    <p>
        According to Java:
        <cfoutput>#Int( variables.Calendar.getTimeInMillis() / 1000 )#</cfoutput>
    </p>
    <p>
        According to ColdFusion:
        <cfoutput>#DateDiff( "s", "01/01/1970 12:00 AM", "07/20/2010 3:40 PM" )#</cfoutput>
    </p>

    what tz is the cf server in? not
    UTC i take it? on the server i'm working on today the tz is ITC (no DST)
    & i get:
    According
    to Java: 1279640400
    According to ColdFusion: 1279640400
    using your
    snippet.
    maybe
    this http://bit.ly/a9ZXss
    will have some insight for you.
    So if ColdFusion treats dates and times as in the local timezone, and my local timezone has DST, then I need to check and correct for that. And there's no simple (by "simple", I mean a native ColdFusion function that can handle this difference) solution?
    So I need to employ something like this:
    <cfset variables.timeDiff = DateDiff( "s", "01/01/1970 12:00 AM", "07/20/2010 3:40 PM" ) />
    <cfif GetTimeZoneInfo().isDSTon IS TRUE>
        <cfset variables.timeDiff = variables.timeDiff + 3600 />
    </cfif>
    <p>
        According to ColdFusion (Adjusted):
        <cfoutput>#variables.timeDiff#</cfoutput>
    </p>
    Which works. I just with there was something native to CF that could handle dates outside of local timezone rules.

Maybe you are looking for

  • Problem With 100% Down Payment A/R Invoice

    Hi All, I am facing a problem while creating a 100% A/R Down Payment Invoice. Let me describe the steps that I have followed-   1. Initially Customer C1 has :                        Account Balance=0, Deliveries=0, Orders=0. It's a new customer.   2.

  • Looking for opinions: AppleCare worth to pay for it ?

    Within the next three weeks we have to decide whether or not investing around 1.000 Euro ($1.200 USD) into three year AppleCare support for our company's XServe. At this time I had made only (more or less) bad experiences with the 90-days-support App

  • OS X Lion Server display problem with menu highlighting and button icons

    I have attached  Grab capture of my screen showing the problems with the window top bars and button icons. This happened after a routine security update. Does anyone have an idea how to fix this? Thanks George Harrison

  • Capturing line items in the routine-mail order sending problem

    Hi I am sending Sales Order Output to the Email. I have configured the output type Using Option 'External Send' Option. But the Problem is Whenever there are blocks for Sales Order Email Should not be send. 1.    When there is a block in Sales Order

  • ISync vs. PC Suite

    Hi there I got an iMac 3 last wednesday n it's REALLY awesome but I'm wondering about iSync, is this the Mac version of Nokia PC Suite ?! or what ?! if so then there are many missing things that were in the original Nokia PC Suite like Nokia Photos .