• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Date string import. Need professional opinion,

Guest
Mar 27, 2007 Mar 27, 2007

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

331

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 27, 2007 Mar 27, 2007
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,startE...

Votes

Translate

Translate
Engaged ,
Mar 27, 2007 Mar 27, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 27, 2007 Mar 27, 2007

Copy link to clipboard

Copied

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>



Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 28, 2007 Mar 28, 2007

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation