pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rien Broekstra <rien@cal018043.student.utwente.nl>
To: pgsql-php@postgresql.org
Subject: strtotime() and postgresql date/time output
Date: Sat, 27 Jan 2001 12:39:42 +0100
Message-ID: <3A72B37E.1000400@rename-it.student.utwente.nl> (raw)

I have the following problem

I want to save timestamps in a database and use them in a php script.

According to the documentation, postgres's date/time output is possible 
in 4 styles. My problem is that the php strtotime() function which I use 
to get a timestamp instead of a date/time string does not understand any 
of these date/time formats.

- Is it possible to manually define a datestyle so Postgresql returns a 
date/time string which  strtotime does understand?
- Is it possible to let Postgresql return just a timestamp instead of a 
date/time string
- Is there another function in php which does understand standard ISO or 
SQL style date/time strings and converts them to a timestamp?

thanks in advance
-- 
Rien Broekstra a.k.a Rienzilla
ICQ: 35629366                   The Drunk Snipers: unreal.snt.utwente.nl
Mail: rien@rename-it.student.utwente.nl
                                 Vestingbar: www.vestingbar.nl




view thread (2+ messages)  latest in thread

Message-ID: <3A72B37E.1000400@rename-it.student.utwente.nl>
Permalink:  ../3A72B37E.1000400@rename-it.student.utwente.nl/
Also on:    postgresql.org/message-id/3A72B37E.1000400@rename-it.student.utwente.nl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: rien@cal018043.student.utwente.nl
  Subject: Re: strtotime() and postgresql date/time output
  In-Reply-To: <3A72B37E.1000400@rename-it.student.utwente.nl>
  References: <3A72B37E.1000400@rename-it.student.utwente.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox