pike.hubbe.net

[Top]
Sql
Sql.mysql
previousSql.mysql()->encode_datetime() Sql.mysql()->quote()next

Method Sql.mysql()->encode_time()


Method encode_time

string Sql.mysql()->encode_time(int time, void|int date)

Description

Converts a system time value to an appropriately formatted time spec for the database.

Parameter time

Time to encode.

Parameter date

If nonzero then time is taken as a "full" unix time spec (where the date part is ignored), otherwise it's converted as a seconds-since-midnight value.


Extracted from Pike v7.3 release 11 at 2001-11-03.