CIF file date formats

62 views
Skip to first unread message

Dave Butland

unread,
Mar 2, 2015, 10:17:05 AM3/2/15
to openrail...@googlegroups.com
So I'm ready to tear my hair out but I've finally got a working CIF file loader that can use the weekly file to validate the current database. It de-duplicates a load of records and can now process a new CIF weekly file in around 10 minutes (which is mostly network time in my test system). 

I'm now just updating it to process the daily deltas and I can't believe what I'm seeing. Are the date formats for the user extract start and end dates really in different formats between the full extract and the delta extract? 

 

petermount

unread,
Mar 2, 2015, 10:28:25 AM3/2/15
to openrail...@googlegroups.com
That sounds odd as I use the same code for full & delta's - no change in the dates.

What date files are you comparing & which record?

For example, the first line for friday's full & update CIF's look right to me:

27-full.cif.gz
HDTPS.UDFROC1.PD1502272702150010DFROC2P       FA270215270216                    

27-update.cif.gz
HDTPS.UDFROC1.PD1502272702150016DFROC1KDFROC1JUA270215270216        

Dave Butland

unread,
Mar 2, 2015, 11:02:32 AM3/2/15
to openrail...@googlegroups.com
My mistake as usual. I'm transposing all the dates for some reason and was looking at 15-02-2013 and thinking it was valid when it was 13-02-2015. 

Ben Woodward

unread,
Mar 2, 2015, 12:36:50 PM3/2/15
to Dave Butland, openraildata-talk
Yeah, the CIF has two date formats, IIRC the header is reverse to the
rest of them.
> --
> You received this message because you are subscribed to the Google Groups "A
> gathering place for the Open Rail Data community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to openraildata-t...@googlegroups.com.
> To post to this group, send email to openrail...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Dave Butland

unread,
Mar 4, 2015, 10:53:28 AM3/4/15
to openrail...@googlegroups.com, dgbu...@gmail.com, b...@benwoodward.me.uk
Thanks, I remember changing the date formatting for the detail records. I didn't realise I was using the same date formatting for the header records and therefore it switched them around too. Using separate formatters now. 
Reply all
Reply to author
Forward
0 new messages