• Wordpress 5.4

    post_date: (string) The time of publish date.

    I’m passing this a Unix time string, and getting back a Last Modified date of 1970/01/01 or something really weird, like:
    Last Modified
    9275/04/11
    or
    Scheduled
    9772/04/11
    (the month and date are correct, but the year is … a bit wrong).

Viewing 3 replies - 1 through 3 (of 3 total)
  • indeed, and that’s because you’re passing in the wrong data format.

    The underlying date import uses PHP function date_create which expects ‘yyyy-mm-dd’ format

    Thread Starter ricks03

    (@ricks03)

    If I understand correctly, you’re saying I can’t pass it a unix time string?

    Is there a way to import a unix time string? Because Post Date I believe is unix time, so I was passing it unix time.

    Thread Starter ricks03

    (@ricks03)

    I went back through and changed the format of the imported data to yyy-mm-dd and it works. Be nice to add a note to that page of import instructions to note the required format.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post Date not working’ is closed to new replies.