Yii Framework Forum: Timestamp Output 31-12-1969 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Timestamp Output 31-12-1969 strange behaviour Rate Topic: -----

#1 User is offline   _hyde 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 15-January 13

Posted 23 February 2013 - 10:45 AM

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!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users