fast-import crash Fatal: Invalid raw date

354 views Asked by At

I'm trying to do a ghp-import into a master branch but I keep getting IOError: [Errno 22] Invalid argument and a crash report:

`
fast-import crash report:

  fast-import process: 9124

  parent process     : 1

  at Sat Jun 2 22:11:29 2018

 fatal: Invalid raw date "1527973889 GMT Daylight Time" in ident: osisieke 
 <[email protected]> 1527973889 GMT Daylight Time

 Most Recent Commands Before Crash
 ---------------------------------
commit refs/heads/gh-pages
* committer osisieke <[email protected]> 1527973889 GMT Daylight Time

Active Branch LRU
-----------------
active_branches = 0 cur, 5 max

pos  clock name
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Inactive Branches
-----------------
refs/heads/gh-pages:
 status      : dirty
 tip commit  : 0000000000000000000000000000000000000000
 old tree    : 0000000000000000000000000000000000000000
 cur tree    : 0000000000000000000000000000000000000000
 commit clock: 0
 last pack   : 


  Marks
  -----

 -------------------
 END OF CRASH REPORT

` I think fast-import tries to parse "osisieke " as a date which of course fails. I'm really confused as how to move forward. Any help please

1

There are 1 answers

0
torek On

You could improve your question a great deal by showing what you're actually running. See How do I ask a good question? and in particular How to create a Minimal, Complete, and Verifiable example. (In particular, if I do a Google Search for "ghp-import", the top results include two different variations, and you're not showing the commands you use.)

In any case, the problem is that 1527973889 GMT Daylight Time is not a valid date format.

The valid date formats are listed in the git fast-import documentation as follows:

The following date formats are supported. A frontend should select the format it will use for this import by passing the format name in the --date-format=<fmt> command-line option.

raw

    This is the Git native format and is <time> SP <offutc>. It is also fast-import's default format, if --date-format was not specified.

    The time of the event is specified by <time> as the number of seconds since the UNIX epoch (midnight, Jan 1, 1970, UTC) and is written as an ASCII decimal integer.

    The local offset is specified by <offutc> as a positive or negative offset from UTC. For example EST (which is 5 hours behind UTC) would be expressed in <tz> by "-0500" while UTC is "+0000". The local offset does not affect <time>; it is used only as an advisement to help formatting routines display the timestamp.

    If the local offset is not available in the source material, use "+0000", or the most common local offset. For example many organizations have a CVS repository which has only ever been accessed by users who are located in the same location and time zone. In this case a reasonable offset from UTC could be assumed.

    Unlike the rfc2822 format, this format is very strict. Any variation in formatting will cause fast-import to reject the value.

rfc2822

    This is the standard email format as described by RFC 2822.

    An example value is “Tue Feb 6 11:22:18 2007 -0500”. The Git parser is accurate, but a little on the lenient side. It is the same parser used by git am when applying patches received from email.

    [snip]

now

    Always use the current time and time zone. The literal now must always be supplied for <when>.

    This is a toy format. [snip]

You do not show what options you passed to git fast-import, but the string 1527973889 GMT Daylight Time begins with a rather promising value (1527973889 represents a time during 2 June 2018, specifically Sat Jun 2 21:11:29 UTC 2018). In other words, this starts out as a valid raw format. However, the time zone offset, which must have the form shown above, is then given as "GMT Daylight Time", which not only fails to have that form, but is also nonsense: GMT does not have Daylight Saving Time. (The UK goes to BST, British Summer Time, in the summer.)