CREATE TABLE tzt(
id MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
ts TIMESTAMP NOT NULL,
dt DATETIME NOT NULL
);
SELECT @@global.time_zone, @@session.time_zone;
SET GLOBAL time_zone = 'Asia/Jerusalem';
SET SESSION time_zone = 'Asia/Jerusalem';
INSERT INTO tzt SET ts='2021-08-22 13:30:00', dt='2021-08-22 13:30:00';
SELECT * FROM tzt\G
SET GLOBAL time_zone = 'America/Sao_Paulo';
SET SESSION time_zone = 'America/Sao_Paulo';
SELECT * FROM tzt\G
How to combine or embed and insert another .docx file (Microsoft office docx word document) into another one using PHPWord Joining two .docx document using php ( phpword library ) $mainTemplateProcessor = new \PhpOffice\PhpWord\TemplateProcessor("file1"); //$mainTemplateProcessor ->setValue('var_name', $value); $innerTemplateProcessor = new \PhpOffice\PhpWord\TemplateProcessor("file2"); //$innerTemplateProcessor->setValue('var2_name', $value2); // extract internal xml from template that will be merged inside main template $innerXml = $innerTemplateProcessor->gettempDocumentMainPart(); $innerXml = preg_replace('/^[\s\S]*<w:body>(.*)<\/w:body>.*/', '$1', $innerXml); // remove tag containing header, footer, images $innerXml = preg_replace('/<w:sectPr>.*<\/w:sectPr>/', '', $innerXml); // inject internal xml inside main template $mainXml = $mainTemplateProcessor->gettempDocumentMainPart(
Comments
Post a Comment