aboutsummaryrefslogtreecommitdiff
path: root/src/gettime.h
AgeCommit message (Collapse)Author
2022-04-28Refactor local time getter functions (#12221)Oblomov
This commit introduces mt_localtime() in src/gettime.h, a wrapper around the OS-specific thread-safe versions of localtime() (resp. localtime_s on Windows and localtime_r in other systems). Per the Open Group recommendation, «portable applications should call tzset() explicitly before using ctime_r() or localtime_r() because setting timezone information is optional for those functions», so we also do a one-shot call of tzset() (_tzset() on Windows to avoid warning C4996). The function is used to replace the localtime() calls in getTimestamp() and makeScreenshot(). (The only reminaing call to localtime() in the tree now is the one in the local copy of the Lua source code.)
2019-08-08Allow customizing chat message format (#8529)ANAND
2017-08-20Modernize source code: last part (#6285)Loïc Blot
* Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-04-29Fix Lint broken by b662a4577d692329b9ca83525e6039f2ddcd1ac1Loic Blot
2017-04-28Clean up getTime helpersShadowNinja
This increases size of the getTime return values to 64 bits. It also removes the TimeGetter classes since the getTime functions are now very precise.
2017-04-06LINT: Switch whitelist check from egrep to awkLoïc Blot
Bonus: make CI happy with the last rules fix
2017-04-01Clang-format: trivial fix on some headers (#5495)Loïc Blot
Fix some headers style and remove them from whitelist
2015-03-25Update timestamp to include dateCraig Robbins
2014-10-09Make sure PRECISION_SECONDS corresponds to the integer 0Kahrl
2013-03-29Add varying levels of precision to TimeTakerkwolekr
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2012-06-17Optimize headersPerttu Ahola
2012-06-05Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola
GPLv2/later, by agreement of major contributors
2010-12-21organizing stuff.Perttu Ahola