Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8040 Posts in 1853 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: Script Importing events  (Read 230 times)
0 Members and 1 Guest are viewing this topic.
Yesbut
New Member
*

Karma: 0
Offline Offline

Posts: 0

IT


WWW
« on: May 06, 2004, 01:15:00 PM »

Hi,

On Windows NT,

I have written a little perl script that takes a txt file and import some events into the events/schedule files.

In this txt file, I have a date format (YYYYMMDD) field,  which I split into YYYY,MM,DD fields. I'm trying to convert this date into the epoch format)like in the schedule file).   I'm passing this date to the timelocal perl function.

I'm doing this way : timelocal(0,0,0,12,4,2004)
or even tried : timelocal(0,0,0,12,4,2004) + $main::localtime_offset;

It works ... but I don't get the correct value.
When I put the returned value  by timelocal(0,0,0,12,4,2004)
in the schedule file, the calendar will show it for some date in July ... Huh?

Any clues ?
Tks

Logged
Yesbut
New Member
*

Karma: 0
Offline Offline

Posts: 0

IT


WWW
« Reply #1 on: May 06, 2004, 05:26:00 PM »

Ok forget that ...
for a bizarre reason the month ranges from 0 to 11
but not the day (which is still 1-31)

So using month-1 works ... altough I keep getting a +18000 sec differences but that's ok.

Still open to suggestion .... :-)

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: