Where does Now() get the date/time?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmorand
    New Member
    • Sep 2007
    • 219

    #1

    Where does Now() get the date/time?

    I was under the impression that the Now() function retrieved the date/time from the server running coldfusion, but that doesn't seem to be the case. Ever since the time change my server shows for example: 1:40pm but when I look at the output of the Now() function I'm getting 12:40pm.

    Any ideas on how to fix this?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    According to the documentation, it is from the server running Coldfusion.

    Are you using TimeFormat to output the time?

    Comment

    • dmorand
      New Member
      • Sep 2007
      • 219

      #3
      Originally posted by acoder
      According to the documentation, it is from the server running Coldfusion.

      Are you using TimeFormat to output the time?
      That's what I thought too. I'm using timeformat to format the time. Here's my code I'm using to validate.

      [code=cfm]<cfoutput>Dat e/Time Loaded: &nbsp;#DateForm at(Now(),"mmm dd yy")# #TimeFormat(Now (),"HH:mm")#</cfoutput>
      [/code]

      I've tried restarting Coldfusion and IIS but I'm still getting the incorrect time.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Perhaps you need to look into getTimeZoneInfo ().

        Comment

        • dmorand
          New Member
          • Sep 2007
          • 219

          #5
          Originally posted by acoder
          Perhaps you need to look into getTimeZoneInfo ().
          I figured it out. I had upgraded to JVM 1.4.2_11 when I was running CF 6, but then I upgraded to CF 7 and it changed my path to the JVM. I swapped it back, and all is well now.

          http://www.adobe.com/go/d2ab4470

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Glad you found the solution and thanks for posting! I think those DST changes in the US have been asked about in the JavaScript forum too.

            Comment

            • c beal

              #7
              where can I find this path to check if this is my problem as well? Thanks

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Check the Java and JVM section in Coldfusion Administrator. You may also find this KB article useful.

                Comment

                Working...