in reply to NOW SQL portability

The definition of epoch varies from OS to OS

Instead of storing the number of seconds relative to some OS-dependent idea of epoch, you could convert it to a proper date/time (e.g. in ISO format), and store that in the DB.

Replies are listed 'Best First'.
Re^2: NOW SQL portability
by SilasTheMonk (Chaplain) on Dec 22, 2009 at 10:37 UTC
    Yes I know this. However my question was what is the most lightweight and portable way of getting today's date in an SQL compatible manner? Also the suggested code in DBD::SQLite uses "time" directly.
      portable way of getting today's date in an SQL compatible manner?

      Not sure if there is a portable way of getting a timestamp in SQL (such as MySQL's NOW()).  AFAIK, there's not even a 100% portable way of telling a DB to store one... (for example, see this for a quick comparison).