From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 81A236F3F2; Fri, 10 Sep 2021 20:51:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 81A236F3F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1631296284; bh=hEuXM0w+DSZzw7Nca/mR22K2u5z9QKhvl4SzDDYBoM0=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=Xb7r96JvdysSP+YrkNTRUh1tfWEgxwe/DEJXxXca3nnbv73Xt6T4FUM6mTusSDB6V PQ9+9kMiDpMNnA1csHCC+PdqorL2cSJz7PAxRGfGetMeTb0FjjO1o3MH+GHCpen1A4 Sk9PfuBygGurKGK7A0vjYLZRLL+uwzDYn1jLoMEY= Received: from smtp44.i.mail.ru (smtp44.i.mail.ru [94.100.177.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 89AC36EC55 for ; Fri, 10 Sep 2021 20:51:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 89AC36EC55 Received: by smtp44.i.mail.ru with esmtpa (envelope-from ) id 1mOkgL-0005dm-F9; Fri, 10 Sep 2021 20:51:21 +0300 To: v.shpilevoy@tarantool.org Date: Fri, 10 Sep 2021 20:50:51 +0300 Message-Id: X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91AE02D33A9C88A2FECE56E2A292C9F7D3C69CC5C84EEB3A800894C459B0CD1B91E1598C3F0EEF8D7F9FBD4DA32C8C43B82CD8ED32F61933FFB9BA65748D3C19F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78E8764B5BC580342EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CF05F7050DCA185A8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8D45633CB4D4F8553C5C24A9354D09AAB117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3A703B70628EAD7BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947CCE4AEF6198D26326AD7EC71F1DB884274AD6D5ED66289B52698AB9A7B718F8C46E0066C2D8992A16725E5C173C3A84C3E1494C00D8047530BA3038C0950A5D36B5C8C57E37DE458B0BC6067A898B09E46D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7B2B7C64F398C7410731C566533BA786AA5CC5B56E945C8DA X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505B82F3CAAD27F3EFA54E6EA7A386515EB X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CBF3286B3348795C6BF1DC90CB23A63A7D4F4193A2C5F7D829C2B6934AE262D3EE7EAB7254005DCED3C94F92EF2FAF35D1E0A4E2319210D9B64D260DF9561598F01A9E91200F654B095EFA5DC98A2BCA98E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343C45ADCD169245FA771421FBEA915CA5EE9260F6617004F675210D88EFCAD2451579887E15EAA8031D7E09C32AA3244C81200C0F4F66A49F7975C768FBDE97AB5595C85A795C7BAEFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXjjexsn+93GoU8MnAid68JN X-Mailru-Sender: 6CA451E36783D721CBEA96CEA26D325D1E1598C3F0EEF8D7F9FBD4DA32C8C43BB7CBEF92542CD7C82F97C478340294DCC77752E0C033A69E0F0C7111264B8915FF1320A92A5534336C18EFA0BB12DBB0 X-Mras: Ok Subject: [Tarantool-patches] [PATCH 0/n] Datetime module implementation, stage #1 X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Timur Safin via Tarantool-patches Reply-To: Timur Safin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" After we have failed to get any consensus on prior version of datetime module, we have returned to the whiteboard and proceeded "the procedure": - PM creates initial design spec, we discuss, and only once consensus achieved...; - ... we implement it gradually, stage by stage. Although, Mons' RFC for datetime module is not yet fully finished, we have agreed that it's enough for stage #1 - https://hackmd.io/@Mons/S1Vfc_axK#%D0%AD%D1%82%D0%B0%D0%BF-1 The patch #1/n is an extraction of functionality needed for stage #1. There is much fuller implementaton though, which you may find here https://github.com/tarantool/tarantool/pull/6426 in addition to initial datetime support created by 1st patch, pull request contain: - Preliminary interval support via `date:add{}` and `date:sub{}` methods, more interval functionality to be added there soon; - messagepack, json, and yaml serialization; - box persistence and indices support; Note, that these things ratified in RFC are neither yet presented in a mentioned pull-request, nor in this patch: - there is no yet %f support in format(). It will be done in the next version of this patch; - there is no Olson integration support necessary for timezone identifiers parsing and tzindex support. Original issue: - https://github.com/tarantool/tarantool/issues/5941 Full branch: - https://github.com/tarantool/tarantool/tree/tsafin/gh-5941-datetime-take2-wip Pull request for fuller branch: - https://github.com/tarantool/tarantool/pull/6426 Timur Safin (1): build, lua: built-in module datetime .gitmodules | 3 + CMakeLists.txt | 8 + cmake/BuildCDT.cmake | 10 + extra/exports | 37 ++ src/CMakeLists.txt | 5 +- src/lib/core/CMakeLists.txt | 1 + src/lib/core/datetime.c | 121 +++++++ src/lib/core/datetime.h | 94 +++++ src/lua/datetime.lua | 623 +++++++++++++++++++++++++++++++++ src/lua/init.c | 4 +- src/lua/utils.c | 19 + src/lua/utils.h | 11 + test/app-tap/datetime.test.lua | 203 +++++++++++ test/unit/CMakeLists.txt | 2 + test/unit/datetime.c | 261 ++++++++++++++ test/unit/datetime.result | 358 +++++++++++++++++++ third_party/c-dt | 1 + 17 files changed, 1759 insertions(+), 2 deletions(-) create mode 100644 cmake/BuildCDT.cmake create mode 100644 src/lib/core/datetime.c create mode 100644 src/lib/core/datetime.h create mode 100644 src/lua/datetime.lua create mode 100755 test/app-tap/datetime.test.lua create mode 100644 test/unit/datetime.c create mode 100644 test/unit/datetime.result create mode 160000 third_party/c-dt -- 2.29.2