G
G
GrimJack2017-09-05 13:04:04
Python
GrimJack, 2017-09-05 13:04:04

Why doesn't carbon parse the timestamp correctly?

When I do this

echo Carbon::parse(Carbon::now()->timestamp)->toDateTimeString()

Then I get a line of the form 5795-09-05 15:05:00
Instead 2017-09-05 10:03:15
What is the reason for this behavior? how to parse the timestamp to its normal form?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2019-05-16
@kshnkvn

You probably didn't close the transaction - that doesn't apply.
Read the documentation - it should be something like:input_cursor.commit()

A
Alexander Aksentiev, 2017-09-05
@GrimJack

parse parses the lines
createFromTimestamp What's the point of bothering with
such nonsense?
echo Carbon::now()->toDateTimeString()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question