Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Timestamp Output 31-12-1969

$
0
0
Hi, I have a strange behaviour (I'm using postgres).
I have this (in db I have 18-01-2013 10:00:00..)

echo $post->startdate; // prints: Mon 18 Ene 10:00:00 2013
echo date('d-m-Y H:i:s',strtotime($post->startdate)); // prints: 31-12-1969 10:00:00

And then without doing something suddenly start working:

echo $post->startdate; // prints: 18-01-2013 10:00:00
echo date('d-m-Y H:i:s',strtotime($post->startdate)); // prints: 18-01-2013 10:00:00

Mmm Could be that I'm making dumps and restoring my project in differents computers, but I don't know what specific I need to do because it suddenly starts working..

Any idea?

Thanks in advance!

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>