problem calculating date

4 views
Skip to first unread message

Collins, Edward

unread,
Nov 25, 2008, 1:36:50 PM11/25/08
to codeswarm
I have tried various diffent date calculations and but I am not able
to calculate a date that is recognized by code_swarm in the XML input
file. I would like to covert 11/25/08 into the date format readable
by code_swarm application.

Can anyone help?

Thanks,
Ed

Michael Ogawa

unread,
Nov 25, 2008, 2:00:27 PM11/25/08
to Collins, Edward, codeswarm
Hi Ed,

The XML date format uses Unix time, which is the number of
milliseconds since January 1, 1970. It should be parsed as an unsigned
long.

Michael

tetrao2003

unread,
Dec 6, 2008, 12:26:32 PM12/6/08
to codeswarm
Michael,
Does it mean that we can't go back before January, 1 1970 ?
Didier

On 25 nov, 20:00, "Michael Ogawa" <michael.og...@gmail.com> wrote:
> Hi Ed,
>
> The XML date format uses Unix time, which is the number of
> milliseconds since January 1, 1970. It should be parsed as an unsigned
> long.
>
> Michael
>

Michael Ogawa

unread,
Dec 6, 2008, 7:30:59 PM12/6/08
to tetrao2003, codeswarm
My mistake. loadRepEvents() parses it as a signed long, from which a
java.util.Date object is created in the FileEvent constructor. If Date
can handle times before 1970, so can code_swarm.

Michael
Reply all
Reply to author
Forward
0 new messages