3 Replies Latest reply on Mar 28, 2007 12:48 PM by brutas

    Date string import. Need professional opinion,

    brutas
      Hi all,
      First of all let me say I have exhausted my options to figure this out. I thought I would ask for some opinions here.
      I have been ask to import some data from a dat file into our CF server that has a Date/Time string that I am not familiar with. Has anyone ever seen this format or worked with it and have any idea how I can decipher it. Here is an example.

      DTSTART:1175254200
      DTEND:1175270400

      This is what I know of the date/time above.

      The DTSTART:1175254200 is March 30, 2007 7:30AM

      I generated this myself is how I know.
      Any help is appreciated.
      Thanks,
      Brian
        • 1. Re: Date string import. Need professional opinion,
          BLXWebMaster Level 1
          What you are looking at is refered to a epoch time value. Typically used on Unix and refers to the number of milliseconds that have elapsed since the date of January 1, 1970.

          You can find many javascript converters to help, or simply write your own once you figure it out.

          Try searching cflib.org for epoch and you will find a few.

          Allen

          • 2. Re: Date string import. Need professional opinion,
            Level 7
            BLXWebMaster wrote:
            > What you are looking at is refered to a epoch time value. Typically used on
            > Unix and refers to the number of milliseconds that have elapsed since the date
            > of January 1, 1970.

            what you're describing is java epoch offset, unix uses *seconds* which is what
            this data appears to be.

            this is fairly simple to handle:

            <cfscript>
            startEpoch=createdate(1970,1,1); // like it says
            unixEpochOffset=1175254200; // seconds since epoch start
            x=dateAdd("s",unixEpochOffset,startEpoch);
            writeoutput(x);
            </cfscript>



            • 3. Re: Date string import. Need professional opinion,
              brutas Level 1
              Well I guess its safe to say I have no UNIX experience. I have went and educated myself on this issue now that I know what it is. Many thanks and the script is appreciated. It actually got me moving on with this project.