我正在尝试将PHP microtime存储到postgres DB,我尝试使用timestamp数据类型但是我遇到了错误。
这就是我试图将它存储到BD(Laravel框架)
的方式class PrinterModifier
{
public static PrintTicket ChangeDevMode(PrintDialog pdialog, int prpty, DrawingVisual vis)
{
var queue = pdialog.PrintQueue;
var cvt = new PrintTicketConverter(queue.Name, PrintTicketConverter.MaxPrintSchemaVersion);
// Display dialog, don't make changes
var devmode1 = cvt.ConvertPrintTicketToDevMode(pdialog.PrintTicket, BaseDevModeType.UserDefault);
// Consistency check
var dmSize = BitConverter.ToInt16(devmode1, 68);
var dmDriverExtra = BitConverter.ToInt16(devmode1, 70);
if (devmode1[361] == 0)
{
devmode1[361] = 1;
}
return cvt.ConvertDevModeToPrintTicket(devmode1, PrintTicketScope.PageScope);
}
}
错误:
带消息的下一个异常'Illuminate \ Database \ QueryException' 'SQLSTATE [22007]:日期时间格式无效:7错误:输入无效 类型timestamp的语法:“1481195739.1502”(SQL:insert into “payment_transaction”(“id”,“payment_id”,“类型”,“金额”, “currency”,“invoice_number”,“reference”,“status”,“psp_reference”, “psp_status”,“microtime”,“updated_at”,“created_at”)值 (a6094610-bd37-11e6-84f4-e710a59a6e32, a6072370-bd37-11e6-ab38-ad42705634e1,open,175,GBP ,, GQX3NITTRZ-20161208111538,完成,8824811960004172,授权, 1481195739.1502,2016-12-08 11:15:39,2016-12-08 11:15:39)返回“id”)'
我的问题是什么是最适合存储php microtime的postgres数据类型(true)