Re: BUG : Postgres Date Problem (and fix)

Blake Watters <[email protected]>
Newsgroups gmane.comp.audio.netjuke.user
Message-ID <[email protected]>
Kevin -

Thanks for the note. I've committed the change to CVS to support the 
postgres users.

Blake

At 07:02 PM 3/31/2003 -0700, Kevin Stussman wrote:
>Anyone using postgres might notice that the "last login" date for a user
>will be something like this on the user admin page:
>
>Last login: 1969-12-31 16:59:59
>
>This is because php cannot parse the Postgresql date :
>
>2003-03-27 12:50:53.543302-07
>
>This is the standard date format for postgreql. When PHP runs this
>through the date("Y-m-d H:i:s",strtotime($field[5])) function (as is
>done in user-list.php), I believe it just chokes.
>
>The fix is to use something like :
>
>SELECT email, name, nickname, created, login_cnt,
>date_trunc('second',last_login)
>
>in the SQL....of course, this might not be the best solution for
>non-postgres people :-)
>
>Regards,
>
>Kevin
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: ValueWeb:
>Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
>No other company gives more support or power for your dedicated server
>http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
>_______________________________________________
>Netjuke-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/netjuke-users



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.