summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-time/src
AgeCommit message (Collapse)Author
2017-04-25Add explicit cast from double to long.Yukihiro "Matz" Matsumoto
2017-04-25Avoid use of `snprintf()` when DISABLE_STDIO is set; fix #3632Yukihiro "Matz" Matsumoto
ref #3492 #3515 #3517
2017-04-03Correctly handle large negative usec value.Clayton Smith
2017-04-03Unify `else` clause styleYukihiro "Matz" Matsumoto
2017-04-01Improve Time.new() performance using division; fix #3561Yukihiro "Matz" Matsumoto
2017-03-29Should raise FloatDomainErrorksss
2017-03-28Fix infinity loopksss
And some cases should raise FloatDomainError
2017-01-09Validate tm values before timegm(); close #3368Yukihiro "Matz" Matsumoto
This issue was reported by https://hackerone.com/volc
2017-01-02add explicit castsYukihiro "Matz" Matsumoto
2017-01-01Initialize potentially uninitialized variable tsec.Yukihiro "Matz" Matsumoto
2016-12-06Raise an exception in time_update_datetime().Yukihiro "Matz" Matsumoto
The function used to return NULL on error, but not checked in the caller site.
2016-11-27Add NULL checks for Time data retrievalYukihiro "Matz" Matsumoto
2016-11-25Fix null pointer dereference in mrb_time_initializeBouke van der Bijl
Reported by https://hackerone.com/raydot
2016-11-24Time#initialize_copy: Check if source time is initialized.Yukihiro "Matz" Matsumoto
To prevent crash from nasty code like: class Time def initialize end end a = Time.new b = Time.new a.initialize_copy b
2016-04-04fix possible memory leak in mruby-time gemYukihiro "Matz" Matsumoto
2015-11-27Implemented round(double) function within mruby-time gem, for it is missing onPaolo Bosetti
VisualStudio compilers where _MSC_ver < 1800
2015-11-27include changed from by quotes ("") to by brackets (<>); close #3032Yukihiro "Matz" Matsumoto
2015-07-09use round for llround. some platform (ex: mingw32) doesn't have llround.Yasuhiro Matsumoto
2015-06-17Added a check for 64 bit time_t overflow; based on a patch from @kext; close ↵Yukihiro "Matz" Matsumoto
#2836
2015-06-16Changed llrint to llroundLukas Joeressen
2015-06-15Rounding errors could make time_alloc impreciseLukas Joeressen
2015-03-22call C11's timespec_get()cremno
gettimeofday() is an obsolescent POSIX function which may be removed in a future version. POSIX recommends using clock_gettime() (also POSIX) instead, but it isn't available on OS X or Windows (at least with MSVC and older MinGW versions). Whereas timespec_get() is part of ISO C11 and mruby uses some small other C11 features too. It isn't universally available yet either, but it might be in the future. And Visual C++ 2015 implements it! Since mruby strives for ISO C and not POSIX compatibility, I think it's a reasonable choice. TIME_UTC is used instead of __STDC_VERSION__, because if TIME_UTC is defined, then most likely timespec_get() is too. This isn't true in case of __STDC_VERSION__ (see MSVC).
2014-10-03add similar range check for tm->usec as wellYukihiro "Matz" Matsumoto
2014-10-03always check range before casting time_t to mrb_intYukihiro "Matz" Matsumoto
2014-10-03time_t may overflow mrb_int when word boxing is usedYukihiro "Matz" Matsumoto
2014-08-20Add API `mrb_data_init` to initialize `MRB_TT_DATA` tagged instance.take_cheeze
2014-08-09timer on windows bug fixed.dycoon
2014-08-03Time#to_i and Time#usec should care about mrb_int overflow on MRB_INT16; ref ↵Yukihiro "Matz" Matsumoto
#2495
2014-07-02Use `MRB_ARGS_ARG(n, o)` instead of `MRB_ARGS_REQ(n) | MRB_ARGS_OPT(o)`.take_cheeze
2014-07-02time overflow check; ref #2337Yukihiro "Matz" Matsumoto
2014-06-09Fix `Time.at` args spec.take_cheeze
2014-05-09pacify MSVC warnings for time.ckyab
2014-05-07Fix build on mingw32/64: struct timeval isn't defined in default. See: ↵mattn
642477ef6a92c553d7abb00051674f4b518046c3
2014-05-02Update time.cwindwiny
miss __MINGW32__ macro check
2014-04-13mruby-time: fix check of `mktime`'s return valuecremno
>If the calendar time cannot be represented, the function returns the value (time_t)(-1). http://www.iso-9899.info/n1256.html#7.23.2.3p3
2014-04-13mruby-time: remove unnecessary `tzset` callcremno
The gem doesn't use the global variables and: >Local timezone information is used as though localtime() calls tzset(). http://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime.html
2014-03-13Don't redefine timeval on MingW64 environmentsMitchell Hashimoto
2014-03-06Fix build on mingw32mattn
2014-03-06fixed broken gettimeofday implementation for Windowsunak
small, but critical typo :)
2014-03-06Merge pull request #1812 from cremno/time-3Yukihiro "Matz" Matsumoto
mruby-time: add gettimeofday(2) for Windows
2014-03-05mruby-time: add gettimeofday(2) for Windowscremno
2014-03-05mruby-time: fix indentation in mrb_time_asctimecremno
2014-03-05mruby-time: store timezone name directlycremno
2014-03-05mruby-time: timezone_names should be constcremno
2014-03-05mruby-time: store strings directly instead of pointers to themcremno
2014-03-05mruby-time: mrb_time_type should be constcremno
2014-03-05mruby-time: fix two tiny typos in commentscremno
2014-03-05mruby-time: rearrange header ordercremno
2014-03-05mruby-time: remove trailing whitespacecremno
2014-03-01use C style comments instead of C++ style commentscubicdaiya
According to CONTRIBUTING.md, Don't use C++ style comments /* This is the prefered comment style */ Use C++ style comments only for temporary comment e.g. commenting out some code lines.