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 A7D756EC40; Tue, 17 Aug 2021 22:16:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A7D756EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1629227796; bh=LsY5Ke85bBYITQdJQAIln4Gnj9mtkPnfmrzKir0Z4sM=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Gs99GlviQBCy/t7CWNIaEKHBizZK1gtwJx18gryv9NCYgR5j7vx2gOAi5B+H4YKGj +EDGaAzylIEnlHDNCRKRoM8iHdgJpOQDlC4E8Hi7D0eaN1tn6yeKrY7TMOyZPr4riv arh5r6ozLDco8Ktkp3/ftQ8BuXdRU22MhFYxuqGA= Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (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 4B9BC6EC40 for ; Tue, 17 Aug 2021 22:16:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4B9BC6EC40 Received: by smtp40.i.mail.ru with esmtpa (envelope-from ) id 1mG4Ze-00022c-BM; Tue, 17 Aug 2021 22:16:34 +0300 Date: Tue, 17 Aug 2021 22:16:33 +0300 To: Timur Safin via Tarantool-patches Message-ID: <20210817191633.jkkadgpwe3imkbas@esperanza> References: <20210817165243.kumsj3x2ia5pijme@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210817165243.kumsj3x2ia5pijme@esperanza> X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD91BCCB18F2C129F87F36E61E9E4584E9D182A05F538085040DCD55F0842B5AEC3FA81F432B11ABDA3CE498C3CED90B626A5D52B6016E72B30 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A8325FA649D0A450EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374D0D183F14C070BA8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D87A9FFC4DA718282D3C95A64EF7B7C5FD117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751F618001F51B5FD3F9D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE38D4DC57D478E6886136E347CC761E074AD6D5ED66289B52698AB9A7B718F8C46E0066C2D8992A16725E5C173C3A84C360DFB64E4A26F5C4BA3038C0950A5D36B5C8C57E37DE458B0BC6067A898B09E46D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE74ABCC139FF3F849B731C566533BA786AA5CC5B56E945C8DA X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458F0AFF96BAACF4158235E5A14AD4A4A4625E192CAD1D9E79D0B18DC6AC13D9A1C8A67461E1F9AEF6F X-C1DE0DAB: 0D63561A33F958A5A91593A0ED7BE28011AECC55B26629754C4BEC18186B4378D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA757E10A58996CBD514410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3494FB0335DF05DC3A6315EFA99977784AFD03D3D08784E308720C3A9F1A778061B2C900F75DE406431D7E09C32AA3244C70E7D04229E20C67F62457E653F5383A853296C06374E60283B48618A63566E0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojuRQ/H5n28tr3Db7lqrQxdA== X-Mailru-Sender: EAC3DA4C40F0802FC8DB1BBF04B7D9F29D823BDF4A2A03B151069A7FAAE700BC775EC6C0DC48B71AF0798C444D2DF93A342CD0BA774DB6A9B195EA2AC6D0D44E902A426E4A0C259E9437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v5 2/8] lua: built-in module datetime 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: Vladimir Davydov via Tarantool-patches Reply-To: Vladimir Davydov Cc: v.shpilevoy@tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Tue, Aug 17, 2021 at 07:52:43PM +0300, Vladimir Davydov wrote: > On Mon, Aug 16, 2021 at 02:59:36AM +0300, Timur Safin via Tarantool-patches wrote: > > +/** > > + * Full datetime structure representing moments > > + * since Unix Epoch (1970-01-01). > > + * Time is kept normalized to UTC, time-zone offset > > + * is informative only. > > + */ > > +struct datetime { > > + /** seconds since epoch */ > > + double secs; > > Please add a comment explaining why you use 'double' instead of > an integer type. Come to think of it, why don't you use two ints here? E.g. one for low 32 bits, another for high 32 bits, or one for years, another for seconds in the year.